axum/axum-debug/tests/fail/not_send.stderr
David Pedersen f1f004a057
Make axum-debug handle more cases (#518)
* Make `axum-debug` handle more cases

* Only just trybuild tests on stable

* revert changes to hello-world example

* Remove a bit of duplication

* return error on generics

* address review feedback

* Support associated functions with receiver or returns `Self`

* fix indentation
2021-11-19 21:32:07 +01:00

21 lines
718 B
Text

error: future cannot be sent between threads safely
--> tests/fail/not_send.rs:4:1
|
4 | async fn handler() {
| ^^^^^ future returned by `handler` is not `Send`
|
= 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
note: required by a bound in `check`
--> tests/fail/not_send.rs:4:1
|
4 | async fn handler() {
| ^^^^^ required by this bound in `check`