aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-03-12 18:12:17 +0000
committerFlorian Diebold <[email protected]>2021-03-12 18:12:17 +0000
commitec70387a4cac131f34847c94e9fe7de66acc241e (patch)
treeeba9f9c4fe5c807b3ac27f0bc9d841f693843226 /crates/hir_ty/src/method_resolution.rs
parentc0459c53572f90fa9134192e432562af3daba5fa (diff)
Use Chalk Environment more directly
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs
index ccc12c075..d57c6de70 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -528,8 +528,7 @@ fn iterate_trait_method_candidates(
528 self_ty.value.dyn_trait().into_iter().flat_map(|t| all_super_traits(db.upcast(), t)); 528 self_ty.value.dyn_trait().into_iter().flat_map(|t| all_super_traits(db.upcast(), t));
529 let env_traits = if let Ty::Placeholder(_) = self_ty.value { 529 let env_traits = if let Ty::Placeholder(_) = self_ty.value {
530 // if we have `T: Trait` in the param env, the trait doesn't need to be in scope 530 // if we have `T: Trait` in the param env, the trait doesn't need to be in scope
531 env.trait_predicates_for_self_ty(&self_ty.value) 531 env.traits_in_scope_from_clauses(&self_ty.value)
532 .map(|tr| tr.trait_)
533 .flat_map(|t| all_super_traits(db.upcast(), t)) 532 .flat_map(|t| all_super_traits(db.upcast(), t))
534 .collect() 533 .collect()
535 } else { 534 } else {