]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir-ty/src/builder.rs
Auto merge of #13223 - lowr:fix/hir-proj-normalization, r=flodiebold
[rust.git] / crates / hir-ty / src / builder.rs
index 8c47e9ce1cbec66cb531b9c7742633130ffa5c74..94d7806cb6e8f261d6a3d686ceb18f4a5b0d5b07 100644 (file)
@@ -4,7 +4,7 @@
 
 use chalk_ir::{
     cast::{Cast, CastTo, Caster},
-    fold::Fold,
+    fold::TypeFoldable,
     interner::HasInterner,
     AdtId, BoundVar, DebruijnIndex, Scalar,
 };
@@ -111,7 +111,7 @@ pub fn fill_with_unknown(self) -> Self {
         this
     }
 
-    pub(crate) fn fill_with_inference_vars(self, table: &mut InferenceTable) -> Self {
+    pub(crate) fn fill_with_inference_vars(self, table: &mut InferenceTable<'_>) -> Self {
         self.fill(|x| match x {
             ParamKind::Type => GenericArgData::Ty(table.new_type_var()).intern(Interner),
             ParamKind::Const(ty) => {
@@ -276,7 +276,7 @@ pub fn build(self) -> ProjectionTy {
     }
 }
 
-impl<T: HasInterner<Interner = Interner> + Fold<Interner>> TyBuilder<Binders<T>> {
+impl<T: HasInterner<Interner = Interner> + TypeFoldable<Interner>> TyBuilder<Binders<T>> {
     fn subst_binders(b: Binders<T>) -> Self {
         let param_kinds = b
             .binders
@@ -290,7 +290,7 @@ fn subst_binders(b: Binders<T>) -> Self {
         TyBuilder::new(b, param_kinds)
     }
 
-    pub fn build(self) -> <T as Fold<Interner>>::Result {
+    pub fn build(self) -> T {
         let (b, subst) = self.build_internal();
         b.substitute(Interner, &subst)
     }