fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: future cannot be sent between threads safely 2 --> $DIR/async-fn-nonsend.rs:68:17 3 | 4LL | assert_send(non_send_temporary_in_match()); 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` 6 | 7 = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` 8note: future is not `Send` as this value is used across an await 9 --> $DIR/async-fn-nonsend.rs:33:26 10 | 11LL | match Some(non_send()) { 12 | ---------------- has type `Option<impl Debug>` which is not `Send` 13LL | Some(_) => fut().await, 14 | ^^^^^ await occurs here, with `Some(non_send())` maybe used later 15note: required by a bound in `assert_send` 16 --> $DIR/async-fn-nonsend.rs:64:24 17 | 18LL | fn assert_send(_: impl Send) {} 19 | ^^^^ required by this bound in `assert_send` 20 21error: future cannot be sent between threads safely 22 --> $DIR/async-fn-nonsend.rs:70:17 23 | 24LL | assert_send(non_sync_with_method_call()); 25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` 26 | 27 = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` 28note: future is not `Send` as this value is used across an await 29 --> $DIR/async-fn-nonsend.rs:46:15 30 | 31LL | let f: &mut std::fmt::Formatter = &mut get_formatter(); 32 | --------------- has type `Formatter<'_>` which is not `Send` 33... 34LL | fut().await; 35 | ^^^^^ await occurs here, with `get_formatter()` maybe used later 36note: required by a bound in `assert_send` 37 --> $DIR/async-fn-nonsend.rs:64:24 38 | 39LL | fn assert_send(_: impl Send) {} 40 | ^^^^ required by this bound in `assert_send` 41 42error: aborting due to 2 previous errors 43