2019-12-13 23:27:55 +00:00
|
|
|
error: future cannot be sent between threads safely
|
2023-01-26 03:51:26 +00:00
|
|
|
--> $DIR/issue-67252-unnamed-future.rs:21:5
|
2019-12-13 23:27:55 +00:00
|
|
|
|
|
2023-01-26 03:51:26 +00:00
|
|
|
LL | spawn(async {
|
|
|
|
| ^^^^^ future created by async block is not `Send`
|
2019-12-13 23:27:55 +00:00
|
|
|
|
|
2023-01-26 03:51:26 +00:00
|
|
|
= help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
|
2019-12-13 23:27:55 +00:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-67252-unnamed-future.rs:23:17
|
2019-12-13 23:27:55 +00:00
|
|
|
|
|
2023-01-26 03:51:26 +00:00
|
|
|
LL | let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
|
|
|
|
| - has type `*mut ()` which is not `Send`
|
2019-12-13 23:27:55 +00:00
|
|
|
LL | AFuture.await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ await occurs here, with `a` maybe used later
|
2021-07-31 16:26:55 +00:00
|
|
|
note: required by a bound in `spawn`
|
2022-10-01 10:19:31 +00:00
|
|
|
--> $DIR/issue-67252-unnamed-future.rs:9:13
|
2021-07-31 16:26:55 +00:00
|
|
|
|
|
|
|
|
LL | fn spawn<T: Send>(_: T) {}
|
|
|
|
| ^^^^ required by this bound in `spawn`
|
2019-12-13 23:27:55 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|