]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-64130-non-send-future-diags.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / async-await / issue-64130-non-send-future-diags.stderr
CommitLineData
60c5eb7d
XL
1error: future cannot be sent between threads safely
2 --> $DIR/issue-64130-non-send-future-diags.rs:21:5
e1599b0c 3 |
e1599b0c 4LL | is_send(foo());
60c5eb7d 5 | ^^^^^^^ future returned by `foo` is not `Send`
e1599b0c 6 |
1b1a35ee 7 = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
60c5eb7d 8note: future is not `Send` as this value is used across an await
e1599b0c
XL
9 --> $DIR/issue-64130-non-send-future-diags.rs:15:5
10 |
11LL | let g = x.lock().unwrap();
1b1a35ee 12 | - has type `MutexGuard<'_, u32>` which is not `Send`
e1599b0c
XL
13LL | baz().await;
14 | ^^^^^^^^^^^ await occurs here, with `g` maybe used later
15LL | }
16 | - `g` is later dropped here
94222f64
XL
17note: required by a bound in `is_send`
18 --> $DIR/issue-64130-non-send-future-diags.rs:7:15
19 |
20LL | fn is_send<T: Send>(t: T) { }
21 | ^^^^ required by this bound in `is_send`
e1599b0c
XL
22
23error: aborting due to previous error
24