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); | ^ warning: unused import: `Extension` --> tests/from_request/fail/generic_without_via_rejection.rs:1:38 | 1 | use axum::{body::Body, routing::get, Extension, Router}; | ^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future {foo}: Handler<_, _>` is not satisfied --> tests/from_request/fail/generic_without_via_rejection.rs:11:42 | 11 | Router::::new().route("/", get(foo)); | --- ^^^ the trait `Handler<_, _>` is not implemented for `fn(Extractor<()>) -> impl Future {foo}` | | | required by a bound introduced by this call | = help: the trait `Handler` is implemented for `Layered` note: required by a bound in `axum::routing::get` --> $WORKSPACE/axum/src/routing/method_routing.rs | | top_level_handler_fn!(get, GET); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `axum::routing::get` = note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)