fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `impl Future<Output = ()>` cannot be sent between threads safely 2 --> $DIR/send-on-foreign-async-fn-in-trait.rs:11:16 3 | 4LL | needs_send(T::test()); 5 | ---------- ^^^^^^^^^ `impl Future<Output = ()>` cannot be sent between threads safely 6 | | 7 | required by a bound introduced by this call 8 | 9 = help: the trait `Send` is not implemented for `impl Future<Output = ()>` 10note: `<T as Foo>::test` is an `async fn` in trait, which does not automatically imply that its future is `Send` 11 --> $DIR/auxiliary/foreign-async-fn.rs:6:5 12 | 13LL | async fn test(); 14 | ^^^^^^^^^^^^^^^^ 15note: required by a bound in `needs_send` 16 --> $DIR/send-on-foreign-async-fn-in-trait.rs:10:27 17 | 18LL | fn needs_send(_: impl Send) {} 19 | ^^^^ required by this bound in `needs_send` 20 21error: aborting due to previous error 22 23For more information about this error, try `rustc --explain E0277`.