mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Don't show trait flyimports for impl trait and placeholders
This commit is contained in:
parent
a7fc2061ea
commit
c81aa68afe
8 changed files with 78 additions and 30 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue