@@ -345,10 +345,6 @@ fn expand_bang_invoc(invoc: Invocation, fld: &mut MacroExpander) -> Expansion {
345
345
fully_expanded
346
346
}
347
347
348
- pub fn expand_item ( it : P < ast:: Item > , fld : & mut MacroExpander ) -> SmallVector < P < ast:: Item > > {
349
- expand_annotatable ( Annotatable :: Item ( it) , fld) . make_items ( )
350
- }
351
-
352
348
// does this attribute list contain "macro_use" ?
353
349
fn contains_macro_use ( fld : & mut MacroExpander , attrs : & [ ast:: Attribute ] ) -> bool {
354
350
for attr in attrs {
@@ -649,7 +645,7 @@ impl<'a, 'b> Folder for MacroExpander<'a, 'b> {
649
645
:: attr:: first_attr_value_str_by_name ( & item. attrs , "path" )
650
646
. unwrap_or ( item. ident . name . as_str ( ) )
651
647
} ) ;
652
- result = expand_item ( item, self ) ;
648
+ result = expand_annotatable ( Annotatable :: Item ( item) , self ) . make_items ( ) ;
653
649
self . cx . directory = directory;
654
650
} else {
655
651
let mut directory = match inner {
@@ -658,11 +654,11 @@ impl<'a, 'b> Folder for MacroExpander<'a, 'b> {
658
654
} ;
659
655
directory. pop ( ) ;
660
656
let directory = replace ( & mut self . cx . directory , directory) ;
661
- result = expand_item ( item, self ) ;
657
+ result = expand_annotatable ( Annotatable :: Item ( item) , self ) . make_items ( ) ;
662
658
self . cx . directory = directory;
663
659
}
664
660
} else {
665
- result = expand_item ( item, self ) ;
661
+ result = expand_annotatable ( Annotatable :: Item ( item) , self ) . make_items ( ) ;
666
662
}
667
663
result
668
664
}
0 commit comments