Rollup merge of #116452 - cjgillot:noassert-erased, r=oli-obk

Do not assert that hidden types don't have erased regions.

cc https://github.com/rust-lang/rust/issues/116306

`args` can have erased regions.
In the linked issue, this is reached by computing whether a large type is `Freeze` to compute its ABI.

I do not have a minimized test to include.
This commit is contained in:
Matthias Krüger 2023-10-05 19:24:35 +02:00 committed by GitHub
commit 76d0b794cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -3116,9 +3116,6 @@ fn bind_generator_hidden_types_above<'tcx>(
bty.instantiate(tcx, args)
})
.collect();
if considering_regions {
debug_assert!(!hidden_types.has_erased_regions());
}
let bound_vars =
tcx.mk_bound_variable_kinds_from_iter(bound_vars.iter().chain(
(num_bound_variables..counter).map(|_| ty::BoundVariableKind::Region(ty::BrAnon)),