2021-11-11 21:26:08 +01:00
|
|
|
error: future cannot be sent between threads safely
|
2021-11-19 21:32:07 +01:00
|
|
|
--> tests/fail/not_send.rs:4:1
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
|
|
|
4 | async fn handler() {
|
2021-11-19 21:32:07 +01:00
|
|
|
| ^^^^^ future returned by `handler` is not `Send`
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
|
|
|
= help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>`
|
|
|
|
note: future is not `Send` as this value is used across an await
|
|
|
|
--> tests/fail/not_send.rs:6:5
|
|
|
|
|
|
|
|
|
5 | let rc = std::rc::Rc::new(());
|
|
|
|
| -- has type `Rc<()>` which is not `Send`
|
|
|
|
6 | async {}.await;
|
|
|
|
| ^^^^^^^^^^^^^^ await occurs here, with `rc` maybe used later
|
|
|
|
7 | }
|
|
|
|
| - `rc` is later dropped here
|
2021-11-19 21:32:07 +01:00
|
|
|
note: required by a bound in `check`
|
|
|
|
--> tests/fail/not_send.rs:4:1
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
|
|
|
4 | async fn handler() {
|
2021-11-19 21:32:07 +01:00
|
|
|
| ^^^^^ required by this bound in `check`
|