diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-06 09:52:02 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-06 09:52:02 +0100 |
commit | 047b5313013383fc4fafaef6d6d8d6a64549e3cb (patch) | |
tree | f4951c835dd6f4840ae02ba5c06d5da44aedae94 /crates/hir/src | |
parent | 4bc8a018302d53951ae855ba57d07095a16ef182 (diff) | |
parent | 08dc69599efb4961319c0118b789d3abb264b7fa (diff) |
Merge #8359
8359: Add Lifetime to TyKind::Ref and DynTy r=flodiebold a=Veykril
CC #8313
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir/src')
-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 | ||