2021-11-11 21:26:08 +01:00
|
|
|
error: future cannot be sent between threads safely
|
2023-01-20 11:47:19 +01:00
|
|
|
--> tests/debug_handler/fail/not_send.rs:3:1
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
2023-01-20 11:47:19 +01:00
|
|
|
3 | #[debug_handler]
|
|
|
|
| ^^^^^^^^^^^^^^^^ future returned by `handler` is not `Send`
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
2022-01-14 09:32:34 +01:00
|
|
|
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
|
2021-11-11 21:26:08 +01:00
|
|
|
note: future is not `Send` as this value is used across an await
|
2023-09-29 09:25:26 +02:00
|
|
|
--> tests/debug_handler/fail/not_send.rs:6:14
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
2023-09-29 09:25:26 +02:00
|
|
|
5 | let _rc = std::rc::Rc::new(());
|
|
|
|
| --- has type `Rc<()>` which is not `Send`
|
2021-11-11 21:26:08 +01:00
|
|
|
6 | async {}.await;
|
2023-09-29 09:25:26 +02:00
|
|
|
| ^^^^^ await occurs here, with `_rc` maybe used later
|
2021-11-11 21:26:08 +01:00
|
|
|
7 | }
|
2023-09-29 09:25:26 +02:00
|
|
|
| - `_rc` is later dropped here
|
2021-11-19 21:32:07 +01:00
|
|
|
note: required by a bound in `check`
|
2023-01-20 11:47:19 +01:00
|
|
|
--> tests/debug_handler/fail/not_send.rs:3:1
|
2021-11-11 21:26:08 +01:00
|
|
|
|
|
2023-01-20 11:47:19 +01:00
|
|
|
3 | #[debug_handler]
|
|
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `check`
|
|
|
|
= note: this error originates in the attribute macro `debug_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
|