Skip to content

Commit

Permalink
Don't ICE when encountering bound regions in generator interior type
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Mar 14, 2024
1 parent dc2ffa4 commit a79b56a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
tcx: TyCtxt<'tcx>,
ty: Ty<'tcx>,
) -> ty::Binder<'tcx, Ty<'tcx>> {
debug_assert!(!ty.has_bound_regions());
let mut counter = 0;
let ty = tcx.fold_regions(ty, |r, current_depth| match r.kind() {
ty::ReErased => {
Expand Down
2 changes: 1 addition & 1 deletion src/doc/reference
2 changes: 1 addition & 1 deletion src/doc/rust-by-example
3 changes: 3 additions & 0 deletions tests/ui/async-await/send-bound-async-closure.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//@ edition: 2021
//@ 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
// variables that point to the same coroutine interior type.
Expand Down

0 comments on commit a79b56a

Please sign in to comment.