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