]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr
Rollup merge of #107022 - scottmcm:ordering-option-eq, r=m-ou-se
[rust.git] / tests / ui / async-await / issue-67252-unnamed-future.drop_tracking_mir.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-67252-unnamed-future.rs:21:5
3    |
4 LL |     spawn(async {
5    |     ^^^^^ future created by async block is not `Send`
6    |
7    = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
8 note: future is not `Send` as this value is used across an await
9   --> $DIR/issue-67252-unnamed-future.rs:23:16
10    |
11 LL |         let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
12    |             - has type `*mut ()` which is not `Send`
13 LL |         AFuture.await;
14    |                ^^^^^^ await occurs here, with `a` maybe used later
15 note: required by a bound in `spawn`
16   --> $DIR/issue-67252-unnamed-future.rs:9:13
17    |
18 LL | fn spawn<T: Send>(_: T) {}
19    |             ^^^^ required by this bound in `spawn`
20
21 error: aborting due to previous error
22