aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 44eaeffb9..e3ac37e4c 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2068,7 +2068,10 @@ impl Type {
2068 match pred { 2068 match pred {
2069 WhereClause::Implemented(trait_ref) => { 2069 WhereClause::Implemented(trait_ref) => {
2070 cb(type_.clone()); 2070 cb(type_.clone());
2071 walk_substs(db, type_, &trait_ref.substitution, cb); 2071 // skip the self type. it's likely the type we just got the bounds from
2072 for ty in trait_ref.substitution.iter().skip(1) {
2073 walk_type(db, &type_.derived(ty.clone()), cb);
2074 }
2072 } 2075 }
2073 _ => (), 2076 _ => (),
2074 } 2077 }