We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 56daaf6 + 8f8cb71 commit f3fadf6Copy full SHA for f3fadf6
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