mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-30 00:00:32 +02:00
feat: add #[diagnostic::on_unimplemented] to IntoResponse and IntoResponseParts (#3723)
This commit is contained in:
committed by
David Pedersen
parent
db96597f47
commit
7bf2f675ef
@@ -16,9 +16,12 @@ error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {fo
|
||||
note: required by a bound in `axum::routing::get`
|
||||
--> $WORKSPACE/axum/src/routing/method_routing.rs
|
||||
|
|
||||
| H: Handler<T, S>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `get`
|
||||
...
|
||||
| top_level_handler_fn!(get, GET);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
|
||||
| -------------------------------
|
||||
| | |
|
||||
| | required by a bound in this function
|
||||
| required by this bound in `get`
|
||||
| in this macro invocation
|
||||
= note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -16,9 +16,12 @@ error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future<Output = ()> {fo
|
||||
note: required by a bound in `axum::routing::get`
|
||||
--> $WORKSPACE/axum/src/routing/method_routing.rs
|
||||
|
|
||||
| H: Handler<T, S>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `get`
|
||||
...
|
||||
| top_level_handler_fn!(get, GET);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
|
||||
| -------------------------------
|
||||
| | |
|
||||
| | required by a bound in this function
|
||||
| required by this bound in `get`
|
||||
| in this macro invocation
|
||||
= note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
@@ -16,28 +16,35 @@ error[E0277]: the trait bound `fn(MyExtractor) -> impl Future<Output = ()> {hand
|
||||
note: required by a bound in `axum::routing::get`
|
||||
--> $WORKSPACE/axum/src/routing/method_routing.rs
|
||||
|
|
||||
| H: Handler<T, S>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `get`
|
||||
...
|
||||
| top_level_handler_fn!(get, GET);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^
|
||||
| -------------------------------
|
||||
| | |
|
||||
| | required by a bound in this function
|
||||
| required by this bound in `get`
|
||||
| in this macro invocation
|
||||
= note: this error originates in the macro `top_level_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `fn(Result<MyExtractor, MyRejection>) -> impl Future<Output = ()> {handler_result}: Handler<_, _>` is not satisfied
|
||||
--> tests/from_request/fail/override_rejection_on_enum_without_via.rs:10:64
|
||||
|
|
||||
10 | let _: Router = Router::new().route("/", get(handler).post(handler_result));
|
||||
| ---- ^^^^^^^^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Result<MyExtractor, MyRejection>) -> impl Future<Output = ()> {handler_result}`
|
||||
| ---- ^^^^^^^^^^^^^^ unsatisfied trait bound
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `Handler<_, _>` is not implemented for fn item `fn(Result<MyExtractor, MyRejection>) -> impl Future<Output = ()> {handler_result}`
|
||||
= note: Consider using `#[axum::debug_handler]` to improve the error message
|
||||
note: required by a bound in `MethodRouter::<S>::post`
|
||||
--> $WORKSPACE/axum/src/routing/method_routing.rs
|
||||
|
|
||||
| H: Handler<T, S>,
|
||||
| ^^^^^^^^^^^^^ required by this bound in `MethodRouter::<S>::post`
|
||||
...
|
||||
| chained_handler_fn!(post, POST);
|
||||
| ^^^^^^^^^^^^^^^^^^^^----^^^^^^^
|
||||
| -------------------------------
|
||||
| | |
|
||||
| | required by a bound in this associated function
|
||||
| required by this bound in `MethodRouter::<S>::post`
|
||||
| in this macro invocation
|
||||
= note: this error originates in the macro `chained_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Reference in New Issue
Block a user