-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap Context.ext in AssertUnwindSafe
- Loading branch information
1 parent
39e02f1
commit cb23e9b
Showing
3 changed files
with
23 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//@ run-pass | ||
// Tests against a regression surfaced by crater in https://github.com/rust-lang/rust/issues/125193 | ||
// Unwind Safety is not a very coherent concept, but we'd prefer no regressions until we kibosh it | ||
// and this is an unstable feature anyways sooo... | ||
|
||
use std::panic::UnwindSafe; | ||
use std::task::Context; | ||
|
||
fn unwind_safe<T: UnwindSafe>() {} | ||
|
||
fn main() { | ||
unwind_safe::<Context<'_>>(); // test UnwindSafe | ||
unwind_safe::<&Context<'_>>(); // test RefUnwindSafe | ||
} |