fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: future cannot be sent between threads safely 2 --> $DIR/unsend-future.rs:20:21 3 | 4LL | require_handler(handler) 5 | ^^^^^^^ future returned by `handler` is not `Send` 6 | 7 = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `*const i32` 8note: future is not `Send` as this value is used across an await 9 --> $DIR/unsend-future.rs:15:14 10 | 11LL | let a = &1 as *const i32; 12 | - has type `*const i32` which is not `Send` 13LL | async {}.await; 14 | ^^^^^ await occurs here, with `a` maybe used later 15note: required by a bound in `require_handler` 16 --> $DIR/unsend-future.rs:11:23 17 | 18LL | fn require_handler<H: Handler>(h: H) {} 19 | ^^^^^^^ required by this bound in `require_handler` 20 21error: aborting due to previous error 22