Skip to content

Commit 43119d6

Browse files
Normalize opaques with escaping bound vars
1 parent 4a4fd12 commit 43119d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/traits/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
499499
// This is really important. While we *can* handle this, this has
500500
// severe performance implications for large opaque types with
501501
// late-bound regions. See `issue-88862` benchmark.
502-
ty::Opaque(def_id, substs) if !substs.has_escaping_bound_vars() => {
502+
ty::Opaque(def_id, substs) => {
503503
// Only normalize `impl Trait` outside of type inference, usually in codegen.
504504
match self.param_env.reveal() {
505505
Reveal::UserFacing => ty.super_fold_with(self),

compiler/rustc_trait_selection/src/traits/query/normalize.rs

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

0 commit comments

Comments
 (0)