@@ -376,7 +376,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
376376 let krate_item = AstFragment :: Items ( smallvec ! [ P ( ast:: Item {
377377 attrs: krate. attrs,
378378 span: krate. span,
379- kind: ast:: ItemKind :: Mod ( krate. module) ,
379+ kind: ast:: ItemKind :: Mod ( box krate. module) ,
380380 ident: Ident :: invalid( ) ,
381381 id: ast:: DUMMY_NODE_ID ,
382382 vis: ast:: Visibility {
@@ -388,7 +388,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
388388 } ) ] ) ;
389389
390390 match self . fully_expand_fragment ( krate_item) . make_items ( ) . pop ( ) . map ( P :: into_inner) {
391- Some ( ast:: Item { attrs, kind : ast:: ItemKind :: Mod ( module) , .. } ) => {
391+ Some ( ast:: Item { attrs, kind : ast:: ItemKind :: Mod ( box module) , .. } ) => {
392392 krate. attrs = attrs;
393393 krate. module = module;
394394 }
@@ -1379,7 +1379,9 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
13791379 _ => unreachable ! ( ) ,
13801380 } )
13811381 }
1382- ast:: ItemKind :: Mod ( ref mut old_mod @ ast:: Mod { .. } ) if ident != Ident :: invalid ( ) => {
1382+ ast:: ItemKind :: Mod ( ref mut old_mod @ box ast:: Mod { .. } )
1383+ if ident != Ident :: invalid ( ) =>
1384+ {
13831385 let sess = & self . cx . sess . parse_sess ;
13841386 let orig_ownership = self . cx . current_expansion . directory_ownership ;
13851387 let mut module = ( * self . cx . current_expansion . module ) . clone ( ) ;
@@ -1412,7 +1414,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
14121414 extern_mod_loaded ( & krate, ident) ;
14131415 }
14141416
1415- * old_mod = krate. module ;
1417+ * old_mod = box krate. module ;
14161418 item. attrs = krate. attrs ;
14171419 // File can have inline attributes, e.g., `#![cfg(...)]` & co. => Reconfigure.
14181420 item = match self . configure ( item) {
0 commit comments