Don't ICE when encountering bound regions in generator interior type
This commit is contained in:
parent
f296c162d8
commit
67f1c53c05
2 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,6 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
) -> ty::Binder<'tcx, Ty<'tcx>> {
|
) -> ty::Binder<'tcx, Ty<'tcx>> {
|
||||||
debug_assert!(!ty.has_bound_regions());
|
|
||||||
let mut counter = 0;
|
let mut counter = 0;
|
||||||
let ty = tcx.fold_regions(ty, |r, current_depth| match r.kind() {
|
let ty = tcx.fold_regions(ty, |r, current_depth| match r.kind() {
|
||||||
ty::ReErased => {
|
ty::ReErased => {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
//@ edition: 2021
|
//@ edition: 2021
|
||||||
//@ check-pass
|
//@ check-pass
|
||||||
|
//@ revisions: current next
|
||||||
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
||||||
|
//@[next] compile-flags: -Znext-solver
|
||||||
|
|
||||||
// This test verifies that we do not create a query cycle when typechecking has several inference
|
// This test verifies that we do not create a query cycle when typechecking has several inference
|
||||||
// variables that point to the same coroutine interior type.
|
// variables that point to the same coroutine interior type.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue