@@ -184,8 +184,6 @@ pub struct TraitDef<'a> {
184
184
/// The span for the current #[derive(Foo)] header.
185
185
pub span : Span ,
186
186
187
- pub attributes : Vec < ast:: Attribute > ,
188
-
189
187
/// Path of the trait, including any type parameters
190
188
pub path : Path ,
191
189
@@ -605,7 +603,7 @@ impl<'a> TraitDef<'a> {
605
603
param. bounds . iter ( ) . cloned ( )
606
604
) . collect ( ) ;
607
605
608
- cx. typaram ( param. ident . span . with_ctxt ( ctxt) , param. ident , vec ! [ ] , bounds, None )
606
+ cx. typaram ( param. ident . span . with_ctxt ( ctxt) , param. ident , bounds, None )
609
607
}
610
608
GenericParamKind :: Const { ty, kw_span, .. } => {
611
609
let const_nodefault_kind = GenericParamKind :: Const {
@@ -718,15 +716,13 @@ impl<'a> TraitDef<'a> {
718
716
let self_type = cx. ty_path ( path) ;
719
717
720
718
let attr = cx. attribute ( cx. meta_word ( self . span , sym:: automatically_derived) ) ;
719
+ let attrs = vec ! [ attr] ;
721
720
let opt_trait_ref = Some ( trait_ref) ;
722
721
723
- let mut a = vec ! [ attr] ;
724
- a. extend ( self . attributes . iter ( ) . cloned ( ) ) ;
725
-
726
722
cx. item (
727
723
self . span ,
728
724
Ident :: empty ( ) ,
729
- a ,
725
+ attrs ,
730
726
ast:: ItemKind :: Impl ( Box :: new ( ast:: Impl {
731
727
unsafety : ast:: Unsafe :: No ,
732
728
polarity : ast:: ImplPolarity :: Positive ,
0 commit comments