]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issues/issue-67893.stderr
Rollup merge of #106944 - Nilstrieb:there-once-was-a-diagnostic, r=WaffleLapkin
[rust.git] / tests / ui / async-await / issues / issue-67893.stderr
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    |        ----------------- ^^^^^^- `x.lock().unwrap()` is later dropped here
13    |        |                 |
14    |        |                 await occurs here, with `x.lock().unwrap()` maybe used later
15    |        has type `MutexGuard<'_, ()>` which is not `Send`
16 note: required by a bound in `g`
17   --> $DIR/issue-67893.rs:6:14
18    |
19 LL | fn g(_: impl Send) {}
20    |              ^^^^ required by this bound in `g`
21
22 error: aborting due to previous error
23