mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
823bacb6e3
This reverts commit 9de1a472b6
.
22 lines
841 B
Plaintext
22 lines
841 B
Plaintext
error: future cannot be sent between threads safely
|
|
--> $DIR/issue-70935-complex-spans.rs:18:23
|
|
|
|
|
LL | fn foo(x: NotSync) -> impl Future + Send {
|
|
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
|
|
|
|
|
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
|
|
note: future is not `Send` as this value is used across an await
|
|
--> $DIR/issue-70935-complex-spans.rs:24:12
|
|
|
|
|
LL | baz(|| async {
|
|
| _____________-
|
|
LL | | foo(x.clone());
|
|
LL | | }).await;
|
|
| | - ^^^^^- the value is later dropped here
|
|
| | | |
|
|
| |_________| await occurs here, with the value maybe used later
|
|
| has type `[closure@$DIR/issue-70935-complex-spans.rs:22:13: 22:15]` which is not `Send`
|
|
|
|
error: aborting due to previous error
|
|
|