2019-10-06 17:14:34 -05:00
|
|
|
error: future cannot be sent between threads safely
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:72:17
|
2019-06-24 19:48:21 -05:00
|
|
|
|
|
|
|
|
LL | assert_send(non_send_temporary_in_match());
|
2021-10-22 15:49:12 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
|
2019-06-24 19:48:21 -05:00
|
|
|
|
|
2021-11-16 18:16:23 -06:00
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
|
2019-10-06 17:14:34 -05:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:36:25
|
2019-10-06 17:14:34 -05:00
|
|
|
|
|
|
|
|
LL | match Some(non_send()) {
|
2021-11-22 16:53:02 -06:00
|
|
|
| ---------------- has type `Option<impl Debug>` which is not `Send`
|
2019-10-06 17:14:34 -05:00
|
|
|
LL | Some(_) => fut().await,
|
2021-11-22 16:53:02 -06:00
|
|
|
| ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
|
2019-10-06 17:14:34 -05:00
|
|
|
...
|
|
|
|
LL | }
|
2021-11-22 16:53:02 -06:00
|
|
|
| - `Some(non_send())` is later dropped here
|
2021-07-31 11:26:55 -05:00
|
|
|
note: required by a bound in `assert_send`
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:67:24
|
2021-07-31 11:26:55 -05:00
|
|
|
|
|
|
|
|
LL | fn assert_send(_: impl Send) {}
|
|
|
|
| ^^^^ required by this bound in `assert_send`
|
2019-06-24 19:48:21 -05:00
|
|
|
|
2021-12-17 17:05:38 -06:00
|
|
|
error: future cannot be sent between threads safely
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:74:17
|
2021-12-17 17:05:38 -06:00
|
|
|
|
|
|
|
|
LL | assert_send(non_sync_with_method_call());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
|
|
|
|
|
|
2022-10-16 03:38:48 -05:00
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
|
2021-12-17 17:05:38 -06:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:49:14
|
2021-12-17 17:05:38 -06:00
|
|
|
|
|
|
|
|
LL | let f: &mut std::fmt::Formatter = &mut get_formatter();
|
|
|
|
| --------------- has type `Formatter<'_>` which is not `Send`
|
|
|
|
...
|
|
|
|
LL | fut().await;
|
|
|
|
| ^^^^^^ await occurs here, with `get_formatter()` maybe used later
|
|
|
|
LL | }
|
|
|
|
LL | }
|
|
|
|
| - `get_formatter()` is later dropped here
|
|
|
|
note: required by a bound in `assert_send`
|
2022-10-01 05:19:31 -05:00
|
|
|
--> $DIR/async-fn-nonsend.rs:67:24
|
2021-12-17 17:05:38 -06:00
|
|
|
|
|
|
|
|
LL | fn assert_send(_: impl Send) {}
|
|
|
|
| ^^^^ required by this bound in `assert_send`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2019-06-24 19:48:21 -05:00
|
|
|
|