diff options
Diffstat (limited to 'crates/hir_ty/src/builder.rs')
-rw-r--r-- | crates/hir_ty/src/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/builder.rs b/crates/hir_ty/src/builder.rs index 4a9a8058f..0bac31e4c 100644 --- a/crates/hir_ty/src/builder.rs +++ b/crates/hir_ty/src/builder.rs | |||
@@ -33,7 +33,7 @@ impl<D> TyBuilder<D> { | |||
33 | fn build_internal(self) -> (D, Substitution) { | 33 | fn build_internal(self) -> (D, Substitution) { |
34 | assert_eq!(self.vec.len(), self.param_count); | 34 | assert_eq!(self.vec.len(), self.param_count); |
35 | // FIXME: would be good to have a way to construct a chalk_ir::Substitution from the interned form | 35 | // FIXME: would be good to have a way to construct a chalk_ir::Substitution from the interned form |
36 | let subst = Substitution(self.vec); | 36 | let subst = Substitution::intern(self.vec); |
37 | (self.data, subst) | 37 | (self.data, subst) |
38 | } | 38 | } |
39 | 39 | ||
@@ -138,7 +138,7 @@ impl TyBuilder<hir_def::AdtId> { | |||
138 | self.vec.push(fallback().cast(&Interner)); | 138 | self.vec.push(fallback().cast(&Interner)); |
139 | } else { | 139 | } else { |
140 | // each default can depend on the previous parameters | 140 | // each default can depend on the previous parameters |
141 | let subst_so_far = Substitution(self.vec.clone()); | 141 | let subst_so_far = Substitution::intern(self.vec.clone()); |
142 | self.vec.push(default_ty.clone().subst(&subst_so_far).cast(&Interner)); | 142 | self.vec.push(default_ty.clone().subst(&subst_so_far).cast(&Interner)); |
143 | } | 143 | } |
144 | } | 144 | } |