File: generic_without_via_rejection.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 (27 lines) | stat: -rw-r--r-- 1,474 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
21
22
23
24
25
26
27
error: #[derive(FromRequest)] only supports generics when used with #[from_request(via)]
 --> tests/from_request/fail/generic_without_via_rejection.rs:6:18
  |
6 | struct Extractor<T>(T);
  |                  ^

error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {foo}: Handler<_, _>` is not satisfied
  --> tests/from_request/fail/generic_without_via_rejection.rs:11:44
   |
11 |     _ = Router::<()>::new().route("/", get(foo));
   |                                        --- ^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Extractor<()>) -> impl Future<Output = ()> {foo}`
   |                                        |
   |                                        required by a bound introduced by this call
   |
   = note: Consider using `#[axum::debug_handler]` to improve the error message
   = help: the following other types implement trait `Handler<T, S>`:
             `Layered<L, H, T, S>` implements `Handler<T, S>`
             `MethodRouter<S>` implements `Handler<(), S>`
note: required by a bound in `axum::routing::get`
  --> $WORKSPACE/axum/src/routing/method_routing.rs
   |
   | top_level_handler_fn!(get, GET);
   | ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
   | |                     |
   | |                     required by a bound in this function
   | required by this bound in `get`
   = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)