Revert "Normalize opaques with escaping bound vars"

This reverts commit 43119d6438.
This commit is contained in:
Michael Goulet 2022-10-24 19:39:19 +00:00
parent fd3bfb3551
commit b8a92c1dd6
2 changed files with 2 additions and 2 deletions

View file

@ -198,7 +198,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
// This is really important. While we *can* handle this, this has
// severe performance implications for large opaque types with
// late-bound regions. See `issue-88862` benchmark.
ty::Opaque(def_id, substs) => {
ty::Opaque(def_id, substs) if !substs.has_escaping_bound_vars() => {
// Only normalize `impl Trait` outside of type inference, usually in codegen.
match self.param_env.reveal() {
Reveal::UserFacing => ty.try_super_fold_with(self),