]>
Commit | Line | Data |
---|---|---|
1 | error: future cannot be sent between threads safely | |
2 | --> $DIR/issue-67893.rs:9:7 | |
3 | | | |
4 | LL | g(issue_67893::run()) | |
5 | | ^^^^^^^^^^^^^^^^^^ future is not `Send` | |
6 | | | |
7 | = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` | |
8 | note: future is not `Send` as this value is used across an await | |
9 | --> $DIR/auxiliary/issue_67893.rs:9:26 | |
10 | | | |
11 | LL | f(*x.lock().unwrap()).await; | |
12 | | ----------------- ^^^^^^ await occurs here, with `x.lock().unwrap()` maybe used later | |
13 | | | | |
14 | | has type `MutexGuard<'_, ()>` which is not `Send` | |
15 | note: `x.lock().unwrap()` is later dropped here | |
16 | --> $DIR/auxiliary/issue_67893.rs:9:32 | |
17 | | | |
18 | LL | f(*x.lock().unwrap()).await; | |
19 | | ^ | |
20 | note: required by a bound in `g` | |
21 | --> $DIR/issue-67893.rs:6:14 | |
22 | | | |
23 | LL | fn g(_: impl Send) {} | |
24 | | ^^^^ required by this bound in `g` | |
25 | ||
26 | error: aborting due to previous error | |
27 |