aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/code_model.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 8e77a4a41..cdb54eca2 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -1924,21 +1924,18 @@ impl Type {
1924 fn walk_type(db: &dyn HirDatabase, type_: &Type, cb: &mut impl FnMut(Type)) { 1924 fn walk_type(db: &dyn HirDatabase, type_: &Type, cb: &mut impl FnMut(Type)) {
1925 let ty = type_.ty.value.strip_references(); 1925 let ty = type_.ty.value.strip_references();
1926 match ty { 1926 match ty {
1927 Ty::Adt(_, parameters) => { 1927 Ty::Adt(..) => {
1928 cb(type_.derived(ty.clone())); 1928 cb(type_.derived(ty.clone()));
1929 walk_substs(db, type_, parameters, cb);
1930 } 1929 }
1931 Ty::AssociatedType(_, parameters) => { 1930 Ty::AssociatedType(..) => {
1932 if let Some(_) = ty.associated_type_parent_trait(db) { 1931 if let Some(_) = ty.associated_type_parent_trait(db) {
1933 cb(type_.derived(ty.clone())); 1932 cb(type_.derived(ty.clone()));
1934 } 1933 }
1935 walk_substs(db, type_, parameters, cb);
1936 } 1934 }
1937 Ty::OpaqueType(_, parameters) => { 1935 Ty::OpaqueType(..) => {
1938 if let Some(bounds) = ty.impl_trait_bounds(db) { 1936 if let Some(bounds) = ty.impl_trait_bounds(db) {
1939 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb); 1937 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb);
1940 } 1938 }
1941 walk_substs(db, type_, parameters, cb);
1942 } 1939 }
1943 Ty::Opaque(opaque_ty) => { 1940 Ty::Opaque(opaque_ty) => {
1944 if let Some(bounds) = ty.impl_trait_bounds(db) { 1941 if let Some(bounds) = ty.impl_trait_bounds(db) {
@@ -1956,7 +1953,10 @@ impl Type {
1956 walk_bounds(db, &type_.derived(ty.clone()), bounds.as_ref(), cb); 1953 walk_bounds(db, &type_.derived(ty.clone()), bounds.as_ref(), cb);
1957 } 1954 }
1958 1955
1959 _ => (), 1956 _ => {}
1957 }
1958 if let Some(substs) = ty.substs() {
1959 walk_substs(db, type_, &substs, cb);
1960 } 1960 }
1961 } 1961 }
1962 1962