Pack Term in the same way as GenericArg.

This shrinks the `PredicateS` type, which is instanted frequently.
This commit is contained in:
Nicholas Nethercote 2022-09-05 14:03:53 +10:00
parent d565d51071
commit 79db32b64e
20 changed files with 191 additions and 108 deletions

View file

@ -552,7 +552,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
)
.ok()
.flatten()
.unwrap_or_else(|| ty::Term::Ty(ty.super_fold_with(self)))
.unwrap_or_else(|| ty.super_fold_with(self).into())
};
// For cases like #95134 we would like to catch overflows early
// otherwise they slip away away and cause ICE.