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