Use ty::OpaqueTy everywhere

This commit is contained in:
Michael Goulet 2022-11-26 21:09:39 +00:00
parent 918ede6474
commit 7f3af72606
55 changed files with 156 additions and 118 deletions

View file

@ -205,7 +205,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) if !substs.has_escaping_bound_vars() => {
ty::Opaque(ty::OpaqueTy { 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),