]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / ui / async-await / issue-70935-complex-spans.no_drop_tracking.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-70935-complex-spans.rs:13: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:19:11
10    |
11 LL |           baz(|| async{
12    |  _____________-
13 LL | |             foo(tx.clone());
14 LL | |         }).await;
15    | |         - ^^^^^^- the value is later dropped here
16    | |         | |
17    | |_________| await occurs here, with the value maybe used later
18    |           has type `[closure@$DIR/issue-70935-complex-spans.rs:17:13: 17:15]` which is not `Send`
19
20 error: aborting due to previous error
21