2022-08-12 18:05:27 +02:00
|
|
|
error: #[derive(FromRequest)] only supports generics when used with #[from_request(via)]
|
2024-03-14 21:19:03 +01:00
|
|
|
--> tests/from_request/fail/generic_without_via_rejection.rs:6:18
|
2022-08-12 18:05:27 +02:00
|
|
|
|
|
2024-03-14 21:19:03 +01:00
|
|
|
6 | struct Extractor<T>(T);
|
2022-08-12 18:05:27 +02:00
|
|
|
| ^
|
|
|
|
|
|
2023-03-12 16:37:32 +01:00
|
|
|
error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {foo}: Handler<_, _>` is not satisfied
|
2026-02-03 23:38:36 +01:00
|
|
|
--> 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
|
2022-08-12 18:05:27 +02:00
|
|
|
note: required by a bound in `axum::routing::get`
|
2026-02-03 23:38:36 +01:00
|
|
|
--> $WORKSPACE/axum/src/routing/method_routing.rs
|
|
|
|
|
|
|
2026-05-05 13:57:13 +02:00
|
|
|
| H: Handler<T, S>,
|
|
|
|
|
| ^^^^^^^^^^^^^ required by this bound in `get`
|
|
|
|
|
...
|
2026-02-03 23:38:36 +01:00
|
|
|
| top_level_handler_fn!(get, GET);
|
2026-05-05 13:57:13 +02:00
|
|
|
| -------------------------------
|
2026-02-03 23:38:36 +01:00
|
|
|
| | |
|
|
|
|
|
| | required by a bound in this function
|
2026-05-05 13:57:13 +02:00
|
|
|
| in this macro invocation
|
2026-02-03 23:38:36 +01:00
|
|
|
= note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
|