about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJack Huey <jack.huey@umassmed.edu>2021-01-04 01:14:07 -0500
committerJack Huey <jack.huey@umassmed.edu>2021-01-16 18:40:47 -0500
commit876192e8cda7d9a557326527328423587747ca88 (patch)
treec8b2d321f53719b346408d6695377de0335b7038
parent4cd6f85a07bf6a8db8288ff37cc11a2ecb72e1a7 (diff)
downloadrust-876192e8cda7d9a557326527328423587747ca88.tar.gz
rust-876192e8cda7d9a557326527328423587747ca88.zip
fold_with not super_fold_with in TypeFoldable impl for Predicate
-rw-r--r--compiler/rustc_middle/src/ty/structural_impls.rs2
-rw-r--r--src/test/ui/specialization/min_specialization/repeated_projection_type.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs
index f2e41c88f15..4c2c6d01a5f 100644
--- a/compiler/rustc_middle/src/ty/structural_impls.rs
+++ b/compiler/rustc_middle/src/ty/structural_impls.rs
@@ -1017,7 +1017,7 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Region<'tcx> {
 
 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)
     }
 
diff --git a/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr b/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr
index fab36adb0f4..92208231b17 100644
--- a/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr
+++ b/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr
@@ -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 {