@@ -211,25 +211,15 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
211211 MacroRulesScope :: Empty => Scope :: ModuleNonGlobs ( module. unwrap ( ) , None ) ,
212212 } ,
213213 Scope :: ModuleNonGlobs ( module, lint_id) => Scope :: ModuleGlobs ( module, lint_id) ,
214- Scope :: ModuleGlobs ( module, lint_id) if module_only => {
215- Scope :: NamespacedCrates ( NamespacedCrateRoot :: Mod ( module) , lint_id)
216- }
217- Scope :: NamespacedCrates ( ..) if module_only | namespace_crate_only => break ,
218- Scope :: ModuleGlobs ( module, lint_id) if module_and_extern_prelude => {
219- Scope :: NamespacedCrates ( NamespacedCrateRoot :: Mod ( module) , lint_id)
220- }
221- Scope :: NamespacedCrates ( ..) if module_and_extern_prelude => match ns {
214+ Scope :: ModuleGlobs ( module, lint_id) if module_only => break ,
215+ Scope :: ModuleGlobs ( module, lint_id) if module_and_extern_prelude => match ns {
222216 TypeNS => {
223217 ctxt. update_unchecked ( |ctxt| ctxt. adjust ( ExpnId :: root ( ) ) ) ;
224218 Scope :: ExternPreludeItems
225219 }
226220 ValueNS | MacroNS => break ,
227221 } ,
228222 Scope :: ModuleGlobs ( module, prev_lint_id) => {
229- Scope :: NamespacedCrates ( NamespacedCrateRoot :: Mod ( module) , prev_lint_id)
230- }
231- Scope :: NamespacedCrates ( namespace_crate_root, prev_lint_id) => {
232- let module = namespace_crate_root. get_mod ( ) ;
233223 use_prelude = !module. no_implicit_prelude ;
234224 match self . hygienic_lexical_parent ( module, & mut ctxt, derive_fallback_lint_id) {
235225 Some ( ( parent_module, lint_id) ) => {
@@ -245,6 +235,10 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
245235 }
246236 }
247237 }
238+ Scope :: NamespacedCrates ( ..) => {
239+ assert ! ( namespace_crate_only) ;
240+ break ;
241+ }
248242 Scope :: MacroUsePrelude => Scope :: StdLibPrelude ,
249243 Scope :: BuiltinAttrs => break , // nowhere else to search
250244 Scope :: ExternPreludeItems => Scope :: ExternPreludeFlags ,
0 commit comments