@@ -726,13 +726,11 @@ fn expand_annotatable(a: Annotatable,
726726 let new_items: SmallVector < Annotatable > = match a {
727727 Annotatable :: Item ( it) => match it. node {
728728 ast:: ItemKind :: Mac ( ..) => {
729- let new_items : SmallVector < P < ast :: Item > > = it. and_then ( |it| match it. node {
729+ it. and_then ( |it| match it. node {
730730 ItemKind :: Mac ( mac) =>
731731 expand_mac_invoc ( mac, Some ( it. ident ) , it. attrs , it. span , fld) ,
732732 _ => unreachable ! ( ) ,
733- } ) ;
734-
735- new_items. into_iter ( ) . map ( |i| Annotatable :: Item ( i) ) . collect ( )
733+ } )
736734 }
737735 ast:: ItemKind :: Mod ( _) | ast:: ItemKind :: ForeignMod ( _) => {
738736 let valid_ident =
@@ -748,7 +746,7 @@ fn expand_annotatable(a: Annotatable,
748746 if valid_ident {
749747 fld. cx . mod_pop ( ) ;
750748 }
751- result. into_iter ( ) . map ( |i| Annotatable :: Item ( i ) ) . collect ( )
749+ result
752750 } ,
753751 ast:: ItemKind :: ExternCrate ( _) => {
754752 // We need to error on `#[macro_use] extern crate` when it isn't at the
@@ -757,10 +755,10 @@ fn expand_annotatable(a: Annotatable,
757755 for def in fld. cx . loader . load_crate ( & it, allows_macros) {
758756 fld. cx . insert_macro ( def) ;
759757 }
760- SmallVector :: one ( Annotatable :: Item ( it ) )
758+ SmallVector :: one ( it )
761759 } ,
762- _ => noop_fold_item ( it, fld) . into_iter ( ) . map ( |i| Annotatable :: Item ( i ) ) . collect ( ) ,
763- } ,
760+ _ => noop_fold_item ( it, fld) ,
761+ } . into_iter ( ) . map ( |i| Annotatable :: Item ( i ) ) . collect ( ) ,
764762
765763 Annotatable :: TraitItem ( it) => match it. node {
766764 ast:: TraitItemKind :: Method ( _, Some ( _) ) => {
0 commit comments