mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-17 04:09:03 +01:00
877e3fe4de
Co-authored-by: Michael Scofield <mscofield0@tutanota.com> Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
24 lines
1.3 KiB
Text
24 lines
1.3 KiB
Text
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);
|
|
| ^
|
|
|
|
error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {foo}: Handler<_, _>` is not satisfied
|
|
--> tests/from_request/fail/generic_without_via.rs:10:44
|
|
|
|
|
10 | _ = 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> as Handler<T, S>>
|
|
<MethodRouter<S> as 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 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)
|