diff options
author | Lukas Wirth <[email protected]> | 2021-04-05 21:08:16 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-04-06 09:45:30 +0100 |
commit | 96756f1b1df4729fd00ca96a59971b3997c91934 (patch) | |
tree | 1daa47d67081772ed1a61b0db13ff041337ddf8b /crates/hir | |
parent | 4bc8a018302d53951ae855ba57d07095a16ef182 (diff) |
Add Lifetime to TyKind::Ref
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index db4ebada4..813cd1295 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -1888,9 +1888,10 @@ impl Type { | |||
1888 | substs.iter(&Interner).filter_map(|a| a.ty(&Interner)).any(go) | 1888 | substs.iter(&Interner).filter_map(|a| a.ty(&Interner)).any(go) |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | TyKind::Array(ty) | TyKind::Slice(ty) | TyKind::Raw(_, ty) | TyKind::Ref(_, ty) => { | 1891 | TyKind::Array(ty) |
1892 | go(ty) | 1892 | | TyKind::Slice(ty) |
1893 | } | 1893 | | TyKind::Raw(_, ty) |
1894 | | TyKind::Ref(_, _, ty) => go(ty), | ||
1894 | 1895 | ||
1895 | TyKind::Scalar(_) | 1896 | TyKind::Scalar(_) |
1896 | | TyKind::Str | 1897 | | TyKind::Str |
@@ -2148,7 +2149,10 @@ impl Type { | |||
2148 | ); | 2149 | ); |
2149 | } | 2150 | } |
2150 | 2151 | ||
2151 | TyKind::Ref(_, ty) | TyKind::Raw(_, ty) | TyKind::Array(ty) | TyKind::Slice(ty) => { | 2152 | TyKind::Ref(_, _, ty) |
2153 | | TyKind::Raw(_, ty) | ||
2154 | | TyKind::Array(ty) | ||
2155 | | TyKind::Slice(ty) => { | ||
2152 | walk_type(db, &type_.derived(ty.clone()), cb); | 2156 | walk_type(db, &type_.derived(ty.clone()), cb); |
2153 | } | 2157 | } |
2154 | 2158 | ||