diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -9,7 +9,6 @@ use quote::quote; use quote::quote_spanned; use quote::ToTokens; use syn::parse_macro_input; -use syn::punctuated::Punctuated; use syn::spanned::Spanned; use syn::token::Brace; use syn::token::Gt; @@ -171,7 +170,15 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { trait_token: Trait::default(), generics: original_trait.generics.clone(), colon_token: None, - supertraits: Punctuated::new(), + supertraits: original_trait + .supertraits + .iter() + .filter(|t| match t { + TypeParamBound::Trait(t) => !t.path.is_ident("Sized"), + TypeParamBound::Lifetime(_) => true, + }) + .cloned() + .collect(), brace_token: Brace::default(), items: Vec::new(), }; |