fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `MutexGuard<'_, ()>` cannot be sent between threads safely 2 --> $DIR/issue-67893.rs:9:7 3 | 4LL | g(issue_67893::run()) 5 | - ^^^^^^^^^^^^^^^^^^ `MutexGuard<'_, ()>` cannot be sent between threads safely 6 | | 7 | required by a bound introduced by this call 8 | 9 ::: $DIR/auxiliary/issue_67893.rs:9:1 10 | 11LL | pub async fn run() { 12 | ------------------ within this `impl Future<Output = ()>` 13 | 14 = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` 15 = note: required because it captures the following types: `Arc<Mutex<()>>`, `MutexGuard<'_, ()>`, `impl Future<Output = ()>` 16note: required because it's used within this `async fn` body 17 --> $DIR/auxiliary/issue_67893.rs:9:20 18 | 19LL | pub async fn run() { 20 | ____________________^ 21LL | | let x: Arc<Mutex<()>> = make_arc(); 22LL | | f(*x.lock().unwrap()).await; 23LL | | } 24 | |_^ 25note: required by a bound in `g` 26 --> $DIR/issue-67893.rs:6:14 27 | 28LL | fn g(_: impl Send) {} 29 | ^^^^ required by this bound in `g` 30 31error: aborting due to previous error 32 33For more information about this error, try `rustc --explain E0277`.