Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
bae2b51c5f45856eb9c214e5454d2edc48b38c24
rust/tests/ui/coroutine/auxiliary/unwind-aux.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
201 B
Rust
Raw Normal View History

Fix coroutine validation for mixed panic strategy Validation introduced in #113124 allows UnwindAction::Continue and TerminatorKind::Resume to occur only in functions with ABI that can unwind. The function ABI depends on the panic strategy, which can vary across crates. Usually MIR is built and validated in the same crate. The coroutine drop glue thus far was an exception. As a result validation could fail when mixing different panic strategies. Avoid the problem by executing AbortUnwindingCalls along with the validation.
2023-11-28 00:00:00 +00:00
//@ compile-flags: -Cpanic=unwind --crate-type=lib
//@ no-prefer-dynamic
//@ edition:2021
#![feature(coroutines)]
pub fn run<T>(a: T) {
let _ = move || {
drop(a);
yield;
};
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 214ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API