1 error[E0277]: the type `&mut Context<'_>` may not be safely transferred across an unwind boundary
2 --> $DIR/async-is-unwindsafe.rs:12:19
4 LL | is_unwindsafe(async {
7 LL | | use std::ptr::null;
8 LL | | use std::task::{Context, RawWaker, RawWakerVTable, Waker};
14 | |_____`&mut Context<'_>` may not be safely transferred across an unwind boundary
15 | within this `[async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6]`
17 = help: within `[async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6]`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`
18 = note: `UnwindSafe` is implemented for `&std::task::Context<'_>`, but not for `&mut std::task::Context<'_>`
19 note: future does not implement `UnwindSafe` as this value is used across an await
20 --> $DIR/async-is-unwindsafe.rs:25:17
22 LL | let cx_ref = &mut cx;
23 | ------ has type `&mut Context<'_>` which does not implement `UnwindSafe`
25 LL | async {}.await; // this needs an inner await point
26 | ^^^^^^ await occurs here, with `cx_ref` maybe used later
29 | - `cx_ref` is later dropped here
30 note: required by a bound in `is_unwindsafe`
31 --> $DIR/async-is-unwindsafe.rs:3:26
33 LL | fn is_unwindsafe(_: impl std::panic::UnwindSafe) {}
34 | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `is_unwindsafe`
36 error: aborting due to previous error
38 For more information about this error, try `rustc --explain E0277`.