1
Fork 0

resolve: Partially unify early and late scope-relative ident resolution

This commit is contained in:
Vadim Petrochenkov 2021-03-13 22:23:18 +03:00
parent afaf33dcaf
commit ee0357af3b
5 changed files with 97 additions and 144 deletions

View file

@ -606,7 +606,7 @@ impl<'a> Resolver<'a> {
/// Lookup typo candidate in scope for a macro or import.
fn early_lookup_typo_candidate(
&mut self,
scope_set: ScopeSet,
scope_set: ScopeSet<'a>,
parent_scope: &ParentScope<'a>,
ident: Ident,
filter_fn: &impl Fn(Res) -> bool,
@ -662,7 +662,7 @@ impl<'a> Resolver<'a> {
let root_module = this.resolve_crate_root(root_ident);
this.add_module_candidates(root_module, &mut suggestions, filter_fn);
}
Scope::Module(module) => {
Scope::Module(module, _) => {
this.add_module_candidates(module, &mut suggestions, filter_fn);
}
Scope::RegisteredAttrs => {