]> git.lizzy.rs Git - rust.git/commitdiff
fold_with not super_fold_with in TypeFoldable impl for Predicate
authorJack Huey <jack.huey@umassmed.edu>
Mon, 4 Jan 2021 06:14:07 +0000 (01:14 -0500)
committerJack Huey <jack.huey@umassmed.edu>
Sat, 16 Jan 2021 23:40:47 +0000 (18:40 -0500)
compiler/rustc_middle/src/ty/structural_impls.rs
src/test/ui/specialization/min_specialization/repeated_projection_type.stderr

index f2e41c88f15f4ecd320e14a7447fe072a9e52b0b..4c2c6d01a5f5f4f7b469f1709f7de1dd42f5c4a0 100644 (file)
@@ -1017,7 +1017,7 @@ fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::Br
 
 impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
     fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
 
 impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
     fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
-        let new = self.inner.kind.super_fold_with(folder);
+        let new = self.inner.kind.fold_with(folder);
         folder.tcx().reuse_or_mk_predicate(self, new)
     }
 
         folder.tcx().reuse_or_mk_predicate(self, new)
     }
 
index fab36adb0f44e5bdd79a86d76d1ffaced705b5e6..92208231b17356ebe5f4303c6bb659b2147a2e8b 100644 (file)
@@ -1,4 +1,4 @@
-error: cannot specialize on `ForAll(Binder(ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[317d]::Id::This) }, (I,))))`
+error: cannot specialize on `Binder(ProjectionPredicate(ProjectionTy { substs: [V], item_def_id: DefId(0:6 ~ repeated_projection_type[317d]::Id::This) }, (I,)))`
   --> $DIR/repeated_projection_type.rs:19:1
    |
 LL | / impl<I, V: Id<This = (I,)>> X for V {
   --> $DIR/repeated_projection_type.rs:19:1
    |
 LL | / impl<I, V: Id<This = (I,)>> X for V {