forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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 3a21fb5
Showing
4 changed files
with
27 additions
and
42 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
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 | ||
} |