diff options
author | Lukas Wirth <[email protected]> | 2021-04-05 21:12:40 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-04-06 09:45:34 +0100 |
commit | 9da191c7e07abec9d9f056fd94ee151aef7417a7 (patch) | |
tree | 93b129a12ebb0c6f9890787d4bfda1e7d325bf68 /crates/hir_ty/src/lower.rs | |
parent | 96756f1b1df4729fd00ca96a59971b3997c91934 (diff) |
Add Lifetime to DynTy
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r-- | crates/hir_ty/src/lower.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 5a769fa6a..ff795377a 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs | |||
@@ -200,7 +200,8 @@ impl<'a> TyLoweringContext<'a> { | |||
200 | ) | 200 | ) |
201 | }); | 201 | }); |
202 | let bounds = crate::make_only_type_binders(1, bounds); | 202 | let bounds = crate::make_only_type_binders(1, bounds); |
203 | TyKind::Dyn(DynTy { bounds }).intern(&Interner) | 203 | TyKind::Dyn(DynTy { bounds, lifetime: LifetimeData::Static.intern(&Interner) }) |
204 | .intern(&Interner) | ||
204 | } | 205 | } |
205 | TypeRef::ImplTrait(bounds) => { | 206 | TypeRef::ImplTrait(bounds) => { |
206 | match self.impl_trait_mode { | 207 | match self.impl_trait_mode { |
@@ -392,6 +393,7 @@ impl<'a> TyLoweringContext<'a> { | |||
392 | ))), | 393 | ))), |
393 | ), | 394 | ), |
394 | ), | 395 | ), |
396 | lifetime: LifetimeData::Static.intern(&Interner), | ||
395 | }; | 397 | }; |
396 | TyKind::Dyn(dyn_ty).intern(&Interner) | 398 | TyKind::Dyn(dyn_ty).intern(&Interner) |
397 | }; | 399 | }; |