Skip to content

Move name resolution logic to a dedicated file #95405

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 11 commits into from
Apr 13, 2022
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/build_reduced_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
Some(TypeNS),
parent_scope,
if finalize { Finalize::SimplePath(id, path.span) } else { Finalize::No },
None,
) {
PathResult::Module(ModuleOrUniformRoot::Module(module)) => {
let res = module.res().expect("visibility resolved to unnamed block");
Expand Down Expand Up @@ -1124,12 +1125,11 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
});
} else {
for ident in single_imports.iter().cloned() {
let result = self.r.resolve_ident_in_module(
let result = self.r.maybe_resolve_ident_in_module(
ModuleOrUniformRoot::Module(module),
ident,
MacroNS,
&self.parent_scope,
None,
);
if let Ok(binding) = result {
let import = macro_use_import(self, ident.span);
Expand Down
Loading