2022-08-12 18:05:27 +02:00
|
|
|
error: #[derive(FromRequest)] only supports generics when used with #[from_request(via)]
|
|
|
|
--> tests/from_request/fail/generic_without_via.rs:5:18
|
|
|
|
|
|
|
|
|
5 | struct Extractor<T>(T);
|
|
|
|
| ^
|
|
|
|
|
2022-08-17 17:13:31 +02:00
|
|
|
error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {foo}: Handler<_, _, _>` is not satisfied
|
|
|
|
--> tests/from_request/fail/generic_without_via.rs:10:46
|
2022-08-12 18:05:27 +02:00
|
|
|
|
|
2022-08-17 17:13:31 +02:00
|
|
|
10 | Router::<(), Body>::new().route("/", get(foo));
|
|
|
|
| --- ^^^ the trait `Handler<_, _, _>` is not implemented for `fn(Extractor<()>) -> impl Future<Output = ()> {foo}`
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2022-08-12 18:05:27 +02:00
|
|
|
|
|
2022-08-17 17:13:31 +02:00
|
|
|
= help: the trait `Handler<T, S, B>` is implemented for `Layered<L, H, T, S, B>`
|
2022-08-12 18:05:27 +02:00
|
|
|
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)
|