Pass last_import_segment and unusable_binding as parameters.

This commit is contained in:
Camille GILLOT
2022-04-08 22:50:56 +02:00
parent eb7f5673d9
commit 24b37a7374
8 changed files with 177 additions and 79 deletions

View File

@@ -1271,12 +1271,11 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
// Look for associated items in the current trait.
if let Some((module, _)) = self.current_trait_ref {
if let Ok(binding) = self.r.resolve_ident_in_module(
if let Ok(binding) = self.r.maybe_resolve_ident_in_module(
ModuleOrUniformRoot::Module(module),
ident,
ns,
&self.parent_scope,
None,
) {
let res = binding.res();
if filter_fn(res) {