File: not_send.stderr

package info (click to toggle)
rust-axum 0.7.9-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,992 kB
  • sloc: javascript: 26; makefile: 24; sql: 6; sh: 1
file content (20 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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<()>`, which is required by `impl Future<Output = ()>: Send`
note: future is not `Send` as this value is used across an await
 --> tests/debug_handler/fail/not_send.rs:6:14
  |
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
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)