@@ -9,8 +9,9 @@ use std::sync::Arc;
99
1010use rustc_ast:: visit:: { self , AssocCtxt , Visitor , WalkItemKind } ;
1111use rustc_ast:: {
12- self as ast, AssocItem , AssocItemKind , Block , ConstItem , Delegation , Fn , ForeignItem ,
13- ForeignItemKind , Inline , Item , ItemKind , NodeId , StaticItem , StmtKind , TraitAlias , TyAlias ,
12+ self as ast, AssocItem , AssocItemKind , Block , ConstItem , DUMMY_NODE_ID , Delegation , Fn ,
13+ ForeignItem , ForeignItemKind , Inline , Item , ItemKind , NodeId , StaticItem , StmtKind , TraitAlias ,
14+ TyAlias ,
1415} ;
1516use rustc_attr_parsing:: AttributeParser ;
1617use rustc_expand:: base:: ResolverExpand ;
@@ -168,7 +169,12 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
168169 let expn_id = self . cstore ( ) . expn_that_defined_untracked ( self . tcx , def_id) ;
169170 let module = self . new_extern_module (
170171 parent,
171- ModuleKind :: Def ( def_kind, def_id, Some ( self . tcx . item_name ( def_id) ) ) ,
172+ ModuleKind :: Def (
173+ def_kind,
174+ def_id,
175+ DUMMY_NODE_ID ,
176+ Some ( self . tcx . item_name ( def_id) ) ,
177+ ) ,
172178 expn_id,
173179 self . def_span ( def_id) ,
174180 // FIXME: Account for `#[no_implicit_prelude]` attributes.
@@ -251,7 +257,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
251257 // Any inherited visibility resolved directly inside an enum or trait
252258 // (i.e. variants, fields, and trait items) inherits from the visibility
253259 // of the enum or trait.
254- ModuleKind :: Def ( DefKind :: Enum | DefKind :: Trait , def_id, _) => {
260+ ModuleKind :: Def ( DefKind :: Enum | DefKind :: Trait , def_id, _, _ ) => {
255261 self . tcx . visibility ( def_id) . expect_local ( )
256262 }
257263 // Otherwise, the visibility is restricted to the nearest parent `mod` item.
@@ -848,7 +854,7 @@ impl<'a, 'ra, 'tcx> DefCollector<'a, 'ra, 'tcx> {
848854 }
849855 let module = self . r . new_local_module (
850856 Some ( parent) ,
851- ModuleKind :: Def ( def_kind, def_id, Some ( ident. name ) ) ,
857+ ModuleKind :: Def ( def_kind, def_id, item . id , Some ( ident. name ) ) ,
852858 expansion. to_expn_id ( ) ,
853859 item. span ,
854860 parent. no_implicit_prelude
@@ -882,7 +888,7 @@ impl<'a, 'ra, 'tcx> DefCollector<'a, 'ra, 'tcx> {
882888
883889 let module = self . r . new_local_module (
884890 Some ( parent) ,
885- ModuleKind :: Def ( def_kind, def_id, Some ( ident. name ) ) ,
891+ ModuleKind :: Def ( def_kind, def_id, item . id , Some ( ident. name ) ) ,
886892 expansion. to_expn_id ( ) ,
887893 item. span ,
888894 parent. no_implicit_prelude ,
0 commit comments