Don't show trait flyimports for impl trait and placeholders

This commit is contained in:
Lukas Wirth 2021-12-10 19:18:21 +01:00
parent a7fc2061ea
commit c81aa68afe
8 changed files with 78 additions and 30 deletions

View file

@ -719,7 +719,7 @@ fn iterate_trait_method_candidates(
let env_traits = match self_ty.value.kind(&Interner) {
TyKind::Placeholder(_) => {
// if we have `T: Trait` in the param env, the trait doesn't need to be in scope
env.traits_in_scope_from_clauses(&self_ty.value)
env.traits_in_scope_from_clauses(self_ty.value.clone())
.flat_map(|t| all_super_traits(db.upcast(), t))
.collect()
}