mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
resolve: Never lookup glob names in modules from other crates
This commit is contained in:
@@ -638,6 +638,13 @@ fn resolve_ident_in_scope<'r>(
|
||||
Err(ControlFlow::Break(..)) => return decl,
|
||||
}
|
||||
}
|
||||
Scope::ModuleGlobs(module, _)
|
||||
if let ModuleKind::Def(_, def_id, _) = module.kind
|
||||
&& !def_id.is_local() =>
|
||||
{
|
||||
// Fast path: external module decoding only creates non-glob declarations.
|
||||
Err(Determined)
|
||||
}
|
||||
Scope::ModuleGlobs(module, derive_fallback_lint_id) => {
|
||||
let (adjusted_parent_scope, adjusted_finalize) = if matches!(
|
||||
scope_set,
|
||||
|
||||
Reference in New Issue
Block a user