fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: future cannot be sent between threads safely 2 --> $DIR/issue-67252-unnamed-future.rs:18:5 3 | 4LL | spawn(async { 5 | ^^^^^ future created by async block is not `Send` 6 | 7 = help: within `{async block@$DIR/issue-67252-unnamed-future.rs:18:11: 22:6}`, the trait `Send` is not implemented for `*mut ()` 8note: future is not `Send` as this value is used across an await 9 --> $DIR/issue-67252-unnamed-future.rs:20:17 10 | 11LL | let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send` 12 | - has type `*mut ()` which is not `Send` 13LL | AFuture.await; 14 | ^^^^^ await occurs here, with `a` maybe used later 15note: required by a bound in `spawn` 16 --> $DIR/issue-67252-unnamed-future.rs:6:13 17 | 18LL | fn spawn<T: Send>(_: T) {} 19 | ^^^^ required by this bound in `spawn` 20 21error: aborting due to previous error 22