aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcynecx <[email protected]>2021-03-24 22:09:22 +0000
committercynecx <[email protected]>2021-03-24 22:09:22 +0000
commitd1156bb52e900c015afd490f509d744c7a5adf10 (patch)
tree277daa1b92f03033bbe5ac6aaa604a38e335debf
parent7155f815b96fbc1de5816e3954c4c03c43e709c9 (diff)
hir: don't use the self module as visible_from in iterate_method_candidates
-rw-r--r--crates/hir/src/lib.rs7
1 files changed, 1 insertions, 6 deletions
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 {
1967 let env = self.ty.environment.clone(); 1967 let env = self.ty.environment.clone();
1968 let krate = krate.id; 1968 let krate = krate.id;
1969 1969
1970 let from_module = match self.as_adt() {
1971 Some(adt) => Some(adt.module(db).id),
1972 None => None,
1973 };
1974
1975 method_resolution::iterate_method_candidates( 1970 method_resolution::iterate_method_candidates(
1976 &canonical, 1971 &canonical,
1977 db, 1972 db,
1978 env, 1973 env,
1979 krate, 1974 krate,
1980 traits_in_scope, 1975 traits_in_scope,
1981 from_module, 1976 None,
1982 name, 1977 name,
1983 method_resolution::LookupMode::MethodCall, 1978 method_resolution::LookupMode::MethodCall,
1984 |ty, it| match it { 1979 |ty, it| match it {