]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-67252-unnamed-future.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.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 | fn spawn<T: Send>(_: T) {}
5 | ---- required by this bound in `spawn`
6 ...
7 LL | spawn(async {
8 | ^^^^^ future created by async block is not `Send`
9 |
10 = help: within `impl Future`, the trait `Send` is not implemented for `*mut ()`
11 note: future is not `Send` as this value is used across an await
12 --> $DIR/issue-67252-unnamed-future.rs:20:9
13 |
14 LL | let _a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
15 | -- has type `*mut ()` which is not `Send`
16 LL | AFuture.await;
17 | ^^^^^^^^^^^^^ await occurs here, with `_a` maybe used later
18 LL | });
19 | - `_a` is later dropped here
20
21 error: aborting due to previous error
22