We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3d39d79 + 8f8cb71 commit f14c1d4Copy full SHA for f14c1d4
src/librustc_middle/ty/structural_impls.rs
@@ -987,7 +987,8 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Region<'tcx> {
987
988
impl<'tcx> TypeFoldable<'tcx> for ty::Predicate<'tcx> {
989
fn super_fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Self {
990
- folder.tcx().mk_predicate(ty::PredicateKind::super_fold_with(self.kind, folder))
+ let new = ty::PredicateKind::super_fold_with(self.kind, folder);
991
+ if new != *self.kind { folder.tcx().mk_predicate(new) } else { *self }
992
}
993
994
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
0 commit comments