aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4512141..99abfdb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -365,6 +365,9 @@ impl TypeTransform {
fn convert(&self, arg: proc_macro2::TokenStream) -> proc_macro2::TokenStream {
match self {
TypeTransform::Into => quote! {#arg.into()},
+ TypeTransform::Box(box_type) => {
+ quote! {Box::new(#arg) as #box_type}
+ }
TypeTransform::Map(opt) => {
let inner = opt.convert(quote!(x));
quote! {#arg.map(|x| #inner)}