]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-70935-complex-spans.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / async-await / issue-70935-complex-spans.stderr
1 error: future cannot be sent between threads safely
2 --> $DIR/issue-70935-complex-spans.rs:10:45
3 |
4 LL | fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send {
5 | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
6 |
7 = help: the trait `Sync` is not implemented for `Sender<i32>`
8 note: future is not `Send` as this value is used across an await
9 --> $DIR/issue-70935-complex-spans.rs:15:11
10 |
11 LL | baz(|| async{
12 | _____________-
13 LL | | foo(tx.clone());
14 LL | | }).await;
15 | | - ^^^^^^ await occurs here, with the value maybe used later
16 | |_________|
17 | has type `[closure@$DIR/issue-70935-complex-spans.rs:13:13: 15:10]` which is not `Send`
18 note: the value is later dropped here
19 --> $DIR/issue-70935-complex-spans.rs:15:17
20 |
21 LL | }).await;
22 | ^
23
24 error: aborting due to previous error
25