aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/builder.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-04 19:22:00 +0100
committerFlorian Diebold <[email protected]>2021-04-04 19:22:00 +0100
commit508a1ecad3cf9c9f01022b3e95f9d6a7ad7a4cd5 (patch)
tree88f6dd30f03815c04054bb50e302dcd92c8d09c9 /crates/hir_ty/src/builder.rs
parentbc8b27884132a4dbfa019f7d3d5fcbbf9f4912af (diff)
Move things in hir_ty into submodules
- all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk`
Diffstat (limited to 'crates/hir_ty/src/builder.rs')
-rw-r--r--crates/hir_ty/src/builder.rs4
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 }