3 use std::future::Future;
6 fn fake_spawn<F: Future + Send + 'static>(f: F) { }
8 async fn wrong_mutex() {
11 let mut guard = m.lock().unwrap();
12 (async { "right"; }).await;
16 (async { "wrong"; }).await;
20 fake_spawn(wrong_mutex()); //~ Error future cannot be sent between threads safely