diff options
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 452b357e8..3a5800885 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -220,8 +220,8 @@ impl ToChalk for GenericArg { | |||
220 | type Chalk = chalk_ir::GenericArg<Interner>; | 220 | type Chalk = chalk_ir::GenericArg<Interner>; |
221 | 221 | ||
222 | fn to_chalk(self, db: &dyn HirDatabase) -> Self::Chalk { | 222 | fn to_chalk(self, db: &dyn HirDatabase) -> Self::Chalk { |
223 | match self.interned { | 223 | match self.interned() { |
224 | crate::GenericArgData::Ty(ty) => ty.to_chalk(db).cast(&Interner), | 224 | crate::GenericArgData::Ty(ty) => ty.clone().to_chalk(db).cast(&Interner), |
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
@@ -249,7 +249,7 @@ impl ToChalk for Substitution { | |||
249 | parameters: chalk_ir::Substitution<Interner>, | 249 | parameters: chalk_ir::Substitution<Interner>, |
250 | ) -> Substitution { | 250 | ) -> Substitution { |
251 | let tys = parameters.iter(&Interner).map(|p| from_chalk(db, p.clone())).collect(); | 251 | let tys = parameters.iter(&Interner).map(|p| from_chalk(db, p.clone())).collect(); |
252 | Substitution(tys) | 252 | Substitution::intern(tys) |
253 | } | 253 | } |
254 | } | 254 | } |
255 | 255 | ||
@@ -546,7 +546,7 @@ pub(super) fn generic_predicate_to_inline_bound( | |||
546 | // have the expected self type | 546 | // have the expected self type |
547 | return None; | 547 | return None; |
548 | } | 548 | } |
549 | let args_no_self = trait_ref.substitution.interned(&Interner)[1..] | 549 | let args_no_self = trait_ref.substitution.interned()[1..] |
550 | .iter() | 550 | .iter() |
551 | .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) | 551 | .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) |
552 | .collect(); | 552 | .collect(); |
@@ -558,7 +558,7 @@ pub(super) fn generic_predicate_to_inline_bound( | |||
558 | return None; | 558 | return None; |
559 | } | 559 | } |
560 | let trait_ = projection_ty.trait_(db); | 560 | let trait_ = projection_ty.trait_(db); |
561 | let args_no_self = projection_ty.substitution.interned(&Interner)[1..] | 561 | let args_no_self = projection_ty.substitution.interned()[1..] |
562 | .iter() | 562 | .iter() |
563 | .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) | 563 | .map(|ty| ty.clone().to_chalk(db).cast(&Interner)) |
564 | .collect(); | 564 | .collect(); |