1
Fork 0
rust/src/test/ui/async-await/async-fn-nonsend.stderr

26 lines
1,011 B
Text
Raw Normal View History

error: future cannot be sent between threads safely
--> $DIR/async-fn-nonsend.rs:56:17
2019-06-24 17:48:21 -07:00
|
LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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<()>`
note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:33:25
|
LL | match Some(non_send()) {
2021-11-22 14:53:02 -08:00
| ---------------- has type `Option<impl Debug>` which is not `Send`
LL | Some(_) => fut().await,
2021-11-22 14:53:02 -08:00
| ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
...
LL | }
2021-11-22 14:53:02 -08:00
| - `Some(non_send())` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/async-fn-nonsend.rs:52:24
|
LL | fn assert_send(_: impl Send) {}
| ^^^^ required by this bound in `assert_send`
2019-06-24 17:48:21 -07:00
error: aborting due to previous error
2019-06-24 17:48:21 -07:00