diff options
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 2a4ad9172..b4c650fa1 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -160,21 +160,19 @@ impl<'a> TyLoweringContext<'a> { | |||
160 | } | 160 | } |
161 | TypeRef::RawPtr(inner, mutability) => { | 161 | TypeRef::RawPtr(inner, mutability) => { |
162 | let inner_ty = self.lower_ty(inner); | 162 | let inner_ty = self.lower_ty(inner); |
163 | TyKind::Raw(lower_to_chalk_mutability(*mutability), Substs::single(inner_ty)) | 163 | TyKind::Raw(lower_to_chalk_mutability(*mutability), inner_ty).intern(&Interner) |
164 | .intern(&Interner) | ||
165 | } | 164 | } |
166 | TypeRef::Array(inner) => { | 165 | TypeRef::Array(inner) => { |
167 | let inner_ty = self.lower_ty(inner); | 166 | let inner_ty = self.lower_ty(inner); |
168 | TyKind::Array(Substs::single(inner_ty)).intern(&Interner) | 167 | TyKind::Array(inner_ty).intern(&Interner) |
169 | } | 168 | } |
170 | TypeRef::Slice(inner) => { | 169 | TypeRef::Slice(inner) => { |
171 | let inner_ty = self.lower_ty(inner); | 170 | let inner_ty = self.lower_ty(inner); |
172 | TyKind::Slice(Substs::single(inner_ty)).intern(&Interner) | 171 | TyKind::Slice(inner_ty).intern(&Interner) |
173 | } | 172 | } |
174 | TypeRef::Reference(inner, _, mutability) => { | 173 | TypeRef::Reference(inner, _, mutability) => { |
175 | let inner_ty = self.lower_ty(inner); | 174 | let inner_ty = self.lower_ty(inner); |
176 | TyKind::Ref(lower_to_chalk_mutability(*mutability), Substs::single(inner_ty)) | 175 | TyKind::Ref(lower_to_chalk_mutability(*mutability), inner_ty).intern(&Interner) |
177 | .intern(&Interner) | ||
178 | } | 176 | } |
179 | TypeRef::Placeholder => TyKind::Unknown.intern(&Interner), | 177 | TypeRef::Placeholder => TyKind::Unknown.intern(&Interner), |
180 | TypeRef::Fn(params, is_varargs) => { | 178 | TypeRef::Fn(params, is_varargs) => { |