Change index for SwitchInt case
The indices do not matter here, and this fixes an index out of bounds panic when compiling a generator that can unwind but not return.
This commit is contained in:
parent
46aeef6e65
commit
8d9f633f4d
1 changed files with 1 additions and 1 deletions
|
|
@ -1108,7 +1108,7 @@ fn create_generator_resume_function<'tcx>(
|
|||
|
||||
if can_unwind {
|
||||
cases.insert(
|
||||
2,
|
||||
1,
|
||||
(POISONED, insert_panic_block(tcx, body, ResumedAfterPanic(generator_kind))),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue