mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Use Chalk Environment more directly
This commit is contained in:
parent
c0459c5357
commit
ec70387a4c
5 changed files with 44 additions and 55 deletions
|
@ -528,8 +528,7 @@ fn iterate_trait_method_candidates(
|
|||
self_ty.value.dyn_trait().into_iter().flat_map(|t| all_super_traits(db.upcast(), t));
|
||||
let env_traits = if let Ty::Placeholder(_) = self_ty.value {
|
||||
// if we have `T: Trait` in the param env, the trait doesn't need to be in scope
|
||||
env.trait_predicates_for_self_ty(&self_ty.value)
|
||||
.map(|tr| tr.trait_)
|
||||
env.traits_in_scope_from_clauses(&self_ty.value)
|
||||
.flat_map(|t| all_super_traits(db.upcast(), t))
|
||||
.collect()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue