]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-67252-unnamed-future.stderr
Update test outputs
[rust.git] / src / test / ui / async-await / issue-67252-unnamed-future.stderr
1 error: future cannot be sent between threads safely
2   --> $DIR/issue-67252-unnamed-future.rs:18:5
3    |
4 LL |     spawn(async {
5    |     ^^^^^ future created by async block is not `Send`
6    |
7    = help: within `impl Future<Output = [async output]>`, 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:20:9
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 LL |     });
16    |     - `_a` is later dropped here
17 note: required by a bound in `spawn`
18   --> $DIR/issue-67252-unnamed-future.rs:6:13
19    |
20 LL | fn spawn<T: Send>(_: T) {}
21    |             ^^^^ required by this bound in `spawn`
22
23 error: aborting due to previous error
24