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