1 error: future cannot be sent between threads safely
2 --> $DIR/issue-71137.rs:22:14
4 LL | fake_spawn(wrong_mutex());
5 | ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
7 = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
8 note: future is not `Send` as this value is used across an await
9 --> $DIR/issue-71137.rs:14:5
11 LL | let mut guard = m.lock().unwrap();
12 | --------- has type `MutexGuard<'_, i32>` which is not `Send`
13 LL | (async { "right"; }).await;
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ await occurs here, with `mut guard` maybe used later
17 | - `mut guard` is later dropped here
18 note: required by a bound in `fake_spawn`
19 --> $DIR/issue-71137.rs:8:27
21 LL | fn fake_spawn<F: Future + Send + 'static>(f: F) { }
22 | ^^^^ required by this bound in `fake_spawn`
24 error: aborting due to previous error