@@ -807,9 +807,9 @@ pub struct ModuleS<'a> {
807
807
def : Option < Def > ,
808
808
is_public : bool ,
809
809
810
- // If the module is an extern crate, `def` is root of the external crate and `extern_crate_did `
811
- // is the DefId of the local `extern crate` item (otherwise, `extern_crate_did ` is None).
812
- extern_crate_did : Option < DefId > ,
810
+ // If the module is an extern crate, `def` is root of the external crate and `extern_crate_id `
811
+ // is the NodeId of the local `extern crate` item (otherwise, `extern_crate_id ` is None).
812
+ extern_crate_id : Option < NodeId > ,
813
813
814
814
resolutions : RefCell < HashMap < ( Name , Namespace ) , NameResolution < ' a > > > ,
815
815
unresolved_imports : RefCell < Vec < ImportDirective > > ,
@@ -856,7 +856,7 @@ impl<'a> ModuleS<'a> {
856
856
parent_link : parent_link,
857
857
def : def,
858
858
is_public : is_public,
859
- extern_crate_did : None ,
859
+ extern_crate_id : None ,
860
860
resolutions : RefCell :: new ( HashMap :: new ( ) ) ,
861
861
unresolved_imports : RefCell :: new ( Vec :: new ( ) ) ,
862
862
module_children : RefCell :: new ( NodeMap ( ) ) ,
@@ -1039,7 +1039,7 @@ impl<'a> NameBinding<'a> {
1039
1039
}
1040
1040
1041
1041
fn is_extern_crate ( & self ) -> bool {
1042
- self . module ( ) . and_then ( |module| module. extern_crate_did ) . is_some ( )
1042
+ self . module ( ) . and_then ( |module| module. extern_crate_id ) . is_some ( )
1043
1043
}
1044
1044
1045
1045
fn is_import ( & self ) -> bool {
@@ -1237,10 +1237,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
1237
1237
parent_link : ParentLink < ' a > ,
1238
1238
def : Def ,
1239
1239
is_public : bool ,
1240
- local_def : DefId )
1240
+ local_node_id : NodeId )
1241
1241
-> Module < ' a > {
1242
1242
let mut module = ModuleS :: new ( parent_link, Some ( def) , false , is_public) ;
1243
- module. extern_crate_did = Some ( local_def ) ;
1243
+ module. extern_crate_id = Some ( local_node_id ) ;
1244
1244
self . arenas . modules . alloc ( module)
1245
1245
}
1246
1246
0 commit comments