about summary refs log tree commit diff
path: root/tests/ui/async-await/context-is-sorta-unwindsafe.rs
blob: 278476ea2379ce91840b199498414b2efea7ae8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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
}