diff options
Diffstat (limited to 'crates/hir_ty/src/traits/chalk')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 128ec166a..9267e32b5 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -3,16 +3,16 @@ | |||
3 | //! Chalk (in both directions); plus some helper functions for more specialized | 3 | //! Chalk (in both directions); plus some helper functions for more specialized |
4 | //! conversions. | 4 | //! conversions. |
5 | 5 | ||
6 | use chalk_ir::{cast::Cast, interner::HasInterner, LifetimeData}; | 6 | use chalk_ir::{cast::Cast, interner::HasInterner}; |
7 | use chalk_solve::rust_ir; | 7 | use chalk_solve::rust_ir; |
8 | 8 | ||
9 | use base_db::salsa::InternKey; | 9 | use base_db::salsa::InternKey; |
10 | use hir_def::{GenericDefId, TypeAliasId}; | 10 | use hir_def::{GenericDefId, TypeAliasId}; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | chalk_ext::ProjectionTyExt, db::HirDatabase, primitive::UintTy, AliasTy, CallableDefId, | 13 | chalk_ext::ProjectionTyExt, db::HirDatabase, primitive::UintTy, static_lifetime, AliasTy, |
14 | Canonical, DomainGoal, FnPointer, GenericArg, InEnvironment, Lifetime, OpaqueTy, ProjectionTy, | 14 | CallableDefId, Canonical, DomainGoal, FnPointer, GenericArg, InEnvironment, Lifetime, OpaqueTy, |
15 | QuantifiedWhereClause, Scalar, Substitution, TraitRef, Ty, TypeWalk, WhereClause, | 15 | ProjectionTy, QuantifiedWhereClause, Scalar, Substitution, TraitRef, Ty, TypeWalk, WhereClause, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | use super::interner::*; | 18 | use super::interner::*; |
@@ -100,7 +100,7 @@ impl ToChalk for Ty { | |||
100 | ); | 100 | ); |
101 | let bounded_ty = chalk_ir::DynTy { | 101 | let bounded_ty = chalk_ir::DynTy { |
102 | bounds: chalk_ir::Binders::new(binders, where_clauses), | 102 | bounds: chalk_ir::Binders::new(binders, where_clauses), |
103 | lifetime: LifetimeData::Static.intern(&Interner), | 103 | lifetime: static_lifetime(), |
104 | }; | 104 | }; |
105 | chalk_ir::TyKind::Dyn(bounded_ty).intern(&Interner) | 105 | chalk_ir::TyKind::Dyn(bounded_ty).intern(&Interner) |
106 | } | 106 | } |
@@ -149,7 +149,7 @@ impl ToChalk for Ty { | |||
149 | where_clauses.bounds.binders.clone(), | 149 | where_clauses.bounds.binders.clone(), |
150 | crate::QuantifiedWhereClauses::from_iter(&Interner, bounds), | 150 | crate::QuantifiedWhereClauses::from_iter(&Interner, bounds), |
151 | ), | 151 | ), |
152 | lifetime: LifetimeData::Static.intern(&Interner), | 152 | lifetime: static_lifetime(), |
153 | }) | 153 | }) |
154 | } | 154 | } |
155 | 155 | ||
@@ -197,7 +197,7 @@ fn ref_to_chalk( | |||
197 | ty: Ty, | 197 | ty: Ty, |
198 | ) -> chalk_ir::Ty<Interner> { | 198 | ) -> chalk_ir::Ty<Interner> { |
199 | let arg = ty.to_chalk(db); | 199 | let arg = ty.to_chalk(db); |
200 | let lifetime = LifetimeData::Static.intern(&Interner); | 200 | let lifetime = static_lifetime(); |
201 | chalk_ir::TyKind::Ref(mutability, lifetime, arg).intern(&Interner) | 201 | chalk_ir::TyKind::Ref(mutability, lifetime, arg).intern(&Interner) |
202 | } | 202 | } |
203 | 203 | ||