From d1156bb52e900c015afd490f509d744c7a5adf10 Mon Sep 17 00:00:00 2001 From: cynecx Date: Wed, 24 Mar 2021 23:09:22 +0100 Subject: hir: don't use the self module as visible_from in iterate_method_candidates --- crates/hir/src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 1a65a5cad..746b4c942 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -1967,18 +1967,13 @@ impl Type { let env = self.ty.environment.clone(); let krate = krate.id; - let from_module = match self.as_adt() { - Some(adt) => Some(adt.module(db).id), - None => None, - }; - method_resolution::iterate_method_candidates( &canonical, db, env, krate, traits_in_scope, - from_module, + None, name, method_resolution::LookupMode::MethodCall, |ty, it| match it { -- cgit v1.2.3