resolve: Never lookup glob names in modules from other crates

This commit is contained in:
Vadim Petrochenkov
2026-03-27 19:23:37 +03:00
parent fda6d37bb8
commit 3ee74ae580
+7
View File
@@ -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,