2020-08-01 16:29:21 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2023-06-10 23:05:07 +00:00
|
|
|
--> $DIR/issue-70935-complex-spans.rs:18:23
|
2020-08-01 16:29:21 +00:00
|
|
|
|
|
2023-06-10 23:05:07 +00:00
|
|
|
LL | fn foo(x: NotSync) -> impl Future + Send {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
2020-08-01 16:29:21 +00:00
|
|
|
|
|
2023-06-10 23:05:07 +00:00
|
|
|
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
|
2020-08-01 16:29:21 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2023-06-10 23:05:07 +00:00
|
|
|
--> $DIR/issue-70935-complex-spans.rs:24:12
|
2020-10-22 05:15:40 +00:00
|
|
|
|
|
2023-06-10 23:05:07 +00:00
|
|
|
LL | baz(|| async {
|
2021-11-16 00:57:53 +00:00
|
|
|
| _____________-
|
2023-06-10 23:05:07 +00:00
|
|
|
LL | | foo(x.clone());
|
2020-10-22 05:15:40 +00:00
|
|
|
LL | | }).await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| | - ^^^^^- the value is later dropped here
|
|
|
|
| | | |
|
|
|
|
| |_________| await occurs here, with the value maybe used later
|
2023-06-10 23:05:07 +00:00
|
|
|
| has type `[closure@$DIR/issue-70935-complex-spans.rs:22:13: 22:15]` which is not `Send`
|
2020-08-01 16:29:21 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|