From a79b56a52aaac2808387065d5ad7f55f097e5231 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 11 Mar 2024 22:20:20 -0400 Subject: [PATCH] Don't ICE when encountering bound regions in generator interior type --- .../src/solve/assembly/structural_traits.rs | 1 - src/doc/reference | 2 +- src/doc/rust-by-example | 2 +- src/tools/cargo | 2 +- tests/ui/async-await/send-bound-async-closure.rs | 3 +++ 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs index af533d8db7149..a8559bdd4380b 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs @@ -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 => { diff --git a/src/doc/reference b/src/doc/reference index 3417f866932cb..5afb503a4c1ea 160000 --- a/src/doc/reference +++ b/src/doc/reference @@ -1 +1 @@ -Subproject commit 3417f866932cb1c09c6be0f31d2a02ee01b4b95d +Subproject commit 5afb503a4c1ea3c84370f8f4c08a1cddd1cdf6ad diff --git a/src/doc/rust-by-example b/src/doc/rust-by-example index 57f1e708f5d58..e093099709456 160000 --- a/src/doc/rust-by-example +++ b/src/doc/rust-by-example @@ -1 +1 @@ -Subproject commit 57f1e708f5d5850562bc385aaf610e6af14d6ec8 +Subproject commit e093099709456e6fd74fecd2505fdf49a2471c10 diff --git a/src/tools/cargo b/src/tools/cargo index a4c63fe5388be..7065f0ef4aa26 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit a4c63fe5388beaa09e5f91196c86addab0a03580 +Subproject commit 7065f0ef4aa267a7455e1c478b5ccacb7baea59c diff --git a/tests/ui/async-await/send-bound-async-closure.rs b/tests/ui/async-await/send-bound-async-closure.rs index 2732fa5d466c3..e4a9ae4cc7569 100644 --- a/tests/ui/async-await/send-bound-async-closure.rs +++ b/tests/ui/async-await/send-bound-async-closure.rs @@ -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.