We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 845754a commit 6561b71Copy full SHA for 6561b71
src/tools/rust-analyzer/crates/hir-def/src/nameres/path_resolution.rs
@@ -493,7 +493,12 @@ impl DefMap {
493
)
494
})
495
};
496
- let prelude = || self.resolve_in_prelude(db, name);
+ let prelude = || {
497
+ if self.block.is_some() && module == DefMap::ROOT {
498
+ return PerNs::none();
499
+ }
500
+ self.resolve_in_prelude(db, name)
501
+ };
502
503
from_legacy_macro
504
.or(from_scope_or_builtin)
0 commit comments