@@ -228,7 +228,7 @@ impl LoweringContext<'_, 'hir> {
228228 pub fn lower_item ( & mut self , i : & Item ) -> Option < hir:: Item < ' hir > > {
229229 let mut ident = i. ident ;
230230 let mut vis = self . lower_visibility ( & i. vis , None ) ;
231- let attrs = self . lower_attrs ( & i. attrs ) ;
231+ let attrs = self . lower_attrs_arena ( & i. attrs ) ;
232232
233233 if let ItemKind :: MacroDef ( ref def) = i. kind {
234234 if !def. legacy || attr:: contains_name ( & i. attrs , sym:: macro_export) {
@@ -244,12 +244,12 @@ impl LoweringContext<'_, 'hir> {
244244 legacy : def. legacy ,
245245 } ) ;
246246 } else {
247- self . non_exported_macro_attrs . extend ( attrs. into_iter ( ) ) ;
247+ self . non_exported_macro_attrs . extend ( attrs. iter ( ) . cloned ( ) ) ;
248248 }
249249 return None ;
250250 }
251251
252- let kind = self . lower_item_kind ( i. span , i. id , & mut ident, & attrs, & mut vis, & i. kind ) ;
252+ let kind = self . lower_item_kind ( i. span , i. id , & mut ident, attrs, & mut vis, & i. kind ) ;
253253
254254 Some ( hir:: Item {
255255 hir_id : self . lower_node_id ( i. id ) ,
@@ -266,7 +266,7 @@ impl LoweringContext<'_, 'hir> {
266266 span : Span ,
267267 id : NodeId ,
268268 ident : & mut Ident ,
269- attrs : & hir:: HirVec < Attribute > ,
269+ attrs : & ' hir [ Attribute ] ,
270270 vis : & mut hir:: Visibility ,
271271 i : & ItemKind ,
272272 ) -> hir:: ItemKind < ' hir > {
@@ -487,7 +487,7 @@ impl LoweringContext<'_, 'hir> {
487487 id : NodeId ,
488488 vis : & mut hir:: Visibility ,
489489 ident : & mut Ident ,
490- attrs : & hir:: HirVec < Attribute > ,
490+ attrs : & ' hir [ Attribute ] ,
491491 ) -> hir:: ItemKind < ' hir > {
492492 debug ! ( "lower_use_tree(tree={:?})" , tree) ;
493493 debug ! ( "lower_use_tree: vis = {:?}" , vis) ;
@@ -550,7 +550,7 @@ impl LoweringContext<'_, 'hir> {
550550 hir:: Item {
551551 hir_id : new_id,
552552 ident,
553- attrs : attrs . into_iter ( ) . cloned ( ) . collect ( ) ,
553+ attrs,
554554 kind,
555555 vis,
556556 span,
@@ -634,7 +634,7 @@ impl LoweringContext<'_, 'hir> {
634634 hir:: Item {
635635 hir_id : new_hir_id,
636636 ident,
637- attrs : attrs . into_iter ( ) . cloned ( ) . collect ( ) ,
637+ attrs,
638638 kind,
639639 vis,
640640 span : use_tree. span ,
0 commit comments