]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issue-64130-4-async-move.stderr
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / src / test / ui / async-await / issue-64130-4-async-move.stderr
CommitLineData
60c5eb7d
XL
1error: future cannot be sent between threads safely
2 --> $DIR/issue-64130-4-async-move.rs:15:17
3 |
29967ef6
XL
4LL | pub fn foo() -> impl Future + Send {
5 | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
60c5eb7d 6 |
1b1a35ee 7 = help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)`
60c5eb7d
XL
8note: future is not `Send` as this value is used across an await
9 --> $DIR/issue-64130-4-async-move.rs:21:26
10 |
11LL | match client.status() {
ba9703b0 12 | ------ has type `&Client` which is not `Send`
60c5eb7d
XL
13LL | 200 => {
14LL | let _x = get().await;
15 | ^^^^^^^^^^^ await occurs here, with `client` maybe used later
16...
17LL | }
18 | - `client` is later dropped here
dfeec247
XL
19help: consider moving this into a `let` binding to create a shorter lived borrow
20 --> $DIR/issue-64130-4-async-move.rs:19:15
21 |
22LL | match client.status() {
23 | ^^^^^^^^^^^^^^^
60c5eb7d
XL
24
25error: aborting due to previous error
26