diff options
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 24 | 
1 files changed, 6 insertions, 18 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 99fad22d4a1..2ed871a4f77 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -910,7 +910,8 @@ pub struct Resolver<'a, 'tcx> { /// `CrateNum` resolutions of `extern crate` items. extern_crate_map: FxHashMap<LocalDefId, CrateNum>, - reexport_map: FxHashMap<LocalDefId, Vec<ModChild>>, + module_children_non_reexports: LocalDefIdMap<Vec<LocalDefId>>, + module_children_reexports: LocalDefIdMap<Vec<ModChild>>, trait_map: NodeMap<Vec<TraitCandidate>>, /// A map from nodes to anonymous modules. @@ -1260,7 +1261,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { lifetimes_res_map: Default::default(), extra_lifetime_params_map: Default::default(), extern_crate_map: Default::default(), - reexport_map: FxHashMap::default(), + module_children_non_reexports: Default::default(), + module_children_reexports: Default::default(), trait_map: NodeMap::default(), underscore_disambiguator: 0, empty_module, @@ -1387,7 +1389,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { let visibilities = self.visibilities; let has_pub_restricted = self.has_pub_restricted; let extern_crate_map = self.extern_crate_map; - let reexport_map = self.reexport_map; let maybe_unused_trait_imports = self.maybe_unused_trait_imports; let glob_map = self.glob_map; let main_def = self.main_def; @@ -1399,7 +1400,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { has_pub_restricted, effective_visibilities, extern_crate_map, - reexport_map, + module_children_non_reexports: self.module_children_non_reexports, + module_children_reexports: self.module_children_reexports, glob_map, maybe_unused_trait_imports, main_def, @@ -1950,20 +1952,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } self.main_def = Some(MainDefinition { res, is_import, span }); } - - // Items that go to reexport table encoded to metadata and visible through it to other crates. - fn is_reexport(&self, binding: &NameBinding<'a>) -> Option<def::Res<!>> { - if binding.is_import() { - let res = binding.res().expect_non_local(); - // Ambiguous imports are treated as errors at this point and are - // not exposed to other crates (see #36837 for more details). - if res != def::Res::Err && !binding.is_ambiguity() { - return Some(res); - } - } - - return None; - } } fn names_to_string(names: &[Symbol]) -> String {  | 
