]>
Commit | Line | Data |
---|---|---|
04454e1e | 1 | error: future cannot be sent between threads safely |
3c0e092e | 2 | --> $DIR/issue-67893.rs:9:7 |
ba9703b0 | 3 | | |
ba9703b0 | 4 | LL | g(issue_67893::run()) |
04454e1e | 5 | | ^^^^^^^^^^^^^^^^^^ future is not `Send` |
94222f64 | 6 | | |
3c0e092e | 7 | = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` |
04454e1e FG |
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 | | ^ | |
94222f64 XL |
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` | |
ba9703b0 XL |
25 | |
26 | error: aborting due to previous error | |
27 |