mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-25 08:37:29 +01:00
22 lines
922 B
Text
22 lines
922 B
Text
error: future cannot be sent between threads safely
|
|
--> tests/debug_handler/fail/not_send.rs:3:1
|
|
|
|
|
3 | #[debug_handler]
|
|
| ^^^^^^^^^^^^^^^^ future returned by `handler` is not `Send`
|
|
|
|
|
= 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
|
|
--> tests/debug_handler/fail/not_send.rs:6:13
|
|
|
|
|
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
|
|
note: required by a bound in `check`
|
|
--> tests/debug_handler/fail/not_send.rs:3:1
|
|
|
|
|
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)
|