@@ -15,9 +15,9 @@ use syn::{
1515 parse_macro_input,
1616 punctuated:: Punctuated ,
1717 token:: { Comma , Plus } ,
18- Error , FnArg , GenericParam , Generics , Ident , ItemTrait , Lifetime , Pat , PatType , Result ,
19- ReturnType , Signature , Token , TraitBound , TraitItem , TraitItemConst , TraitItemFn ,
20- TraitItemType , Type , TypeImplTrait , TypeParamBound ,
18+ Error , FnArg , GenericParam , Ident , ItemTrait , Lifetime , Pat , PatType , Result , ReturnType ,
19+ Signature , Token , TraitBound , TraitItem , TraitItemConst , TraitItemFn , TraitItemType , Type ,
20+ TypeImplTrait , TypeParamBound ,
2121} ;
2222
2323struct Attrs {
@@ -256,17 +256,11 @@ fn blanket_impl_item(
256256 }
257257 }
258258 TraitItem :: Type ( TraitItemType {
259- ident,
260- generics :
261- Generics {
262- params,
263- where_clause,
264- ..
265- } ,
266- ..
259+ ident, generics, ..
267260 } ) => {
261+ let ( impl_generics, ty_generics, where_clause) = generics. split_for_impl ( ) ;
268262 quote ! {
269- type #ident<#params> = <Self as #variant<#generic_names>>:: #ident<#params> #where_clause;
263+ type #ident #impl_generics = <Self as #variant<#generic_names>>:: #ident #ty_generics #where_clause;
270264 }
271265 }
272266 _ => Error :: new_spanned ( item, "unsupported item type" ) . into_compile_error ( ) ,
0 commit comments