Skip to content

Commit a79b56a

Browse files
Don't ICE when encountering bound regions in generator interior type
1 parent dc2ffa4 commit a79b56a

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

compiler/rustc_trait_selection/src/solve/assembly/structural_traits.rs

-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ pub(in crate::solve) fn replace_erased_lifetimes_with_bound_vars<'tcx>(
9797
tcx: TyCtxt<'tcx>,
9898
ty: Ty<'tcx>,
9999
) -> ty::Binder<'tcx, Ty<'tcx>> {
100-
debug_assert!(!ty.has_bound_regions());
101100
let mut counter = 0;
102101
let ty = tcx.fold_regions(ty, |r, current_depth| match r.kind() {
103102
ty::ReErased => {

tests/ui/async-await/send-bound-async-closure.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@ edition: 2021
22
//@ check-pass
3+
//@ revisions: current next
4+
//@ ignore-compare-mode-next-solver (explicit revisions)
5+
//@[next] compile-flags: -Znext-solver
36

47
// This test verifies that we do not create a query cycle when typechecking has several inference
58
// variables that point to the same coroutine interior type.

0 commit comments

Comments
 (0)