]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-70935-complex-spans.stderr
6b599b5d603d914740c6b13580463ea7ed5c9e24
[rust.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:13:9
10    |
11 LL | /         baz(|| async{
12 LL | |             foo(tx.clone());
13 LL | |         }).await;
14    | |________________^ first, await occurs here, with the value maybe used later...
15 note: the value is later dropped here
16   --> $DIR/issue-70935-complex-spans.rs:15:17
17    |
18 LL |         }).await;
19    |                 ^
20
21 error: aborting due to previous error
22