]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/expand.rs
Auto merge of #34652 - jseyfried:fix_expansion_perf, r=nrc
[rust.git] / src / libsyntax / ext / expand.rs
index 540ea0636cf73684112fc7e2392658b7a33c3a2d..b2b63d0dbb4bd76b4b8fe8ac3121adf460438d67 100644 (file)
@@ -769,7 +769,11 @@ fn expand_annotatable(mut item: Annotatable, fld: &mut MacroExpander) -> SmallVe
             };
 
             fld.cx.bt_pop();
-            modified.into_iter().flat_map(|it| expand_annotatable(it, fld)).collect()
+            let configured = modified.into_iter().flat_map(|it| {
+                it.fold_with(&mut fld.strip_unconfigured())
+            }).collect::<SmallVector<_>>();
+
+            configured.into_iter().flat_map(|it| expand_annotatable(it, fld)).collect()
         }
     }
 }