mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Improve error messages with #[diagnostic::do_not_recommend] (#3588)
This commit is contained in:
@@ -7,14 +7,14 @@ error[E0277]: the trait bound `bool: FromRequest<(), axum_core::extract::private
|
||||
= note: Function argument is not a valid axum extractor.
|
||||
See `https://docs.rs/axum/0.8/axum/extract/index.html` for details
|
||||
= help: the following other types implement trait `FromRequestParts<S>`:
|
||||
`()` implements `FromRequestParts<S>`
|
||||
`(T1, T2)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3, T4)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3, T4, T5)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3, T4, T5, T6)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3, T4, T5, T6, T7)` implements `FromRequestParts<S>`
|
||||
`(T1, T2, T3, T4, T5, T6, T7, T8)` implements `FromRequestParts<S>`
|
||||
`ConnectInfo<T>` implements `FromRequestParts<S>`
|
||||
`Extension<T>` implements `FromRequestParts<S>`
|
||||
`HeaderMap` implements `FromRequestParts<S>`
|
||||
`MatchedPath` implements `FromRequestParts<S>`
|
||||
`Method` implements `FromRequestParts<S>`
|
||||
`OriginalUri` implements `FromRequestParts<S>`
|
||||
`Query<T>` implements `FromRequestParts<S>`
|
||||
`RawPathParams` implements `FromRequestParts<S>`
|
||||
and $N others
|
||||
= note: required for `bool` to implement `FromRequest<(), axum_core::extract::private::ViaParts>`
|
||||
note: required by a bound in `__axum_macros_check_handler_0_from_request_check`
|
||||
|
||||
@@ -5,15 +5,14 @@ error[E0277]: the trait bound `NonCloneType: Clone` is not satisfied
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NonCloneType`, which is required by `Extension<NonCloneType>: FromRequest<(), _>`
|
||||
|
|
||||
= help: the following other types implement trait `FromRequest<S, M>`:
|
||||
(T1, T2)
|
||||
(T1, T2, T3)
|
||||
(T1, T2, T3, T4)
|
||||
(T1, T2, T3, T4, T5)
|
||||
(T1, T2, T3, T4, T5, T6)
|
||||
(T1, T2, T3, T4, T5, T6, T7)
|
||||
(T1, T2, T3, T4, T5, T6, T7, T8)
|
||||
(T1, T2, T3, T4, T5, T6, T7, T8, T9)
|
||||
and $N others
|
||||
Body
|
||||
Form<T>
|
||||
Json<T>
|
||||
RawForm
|
||||
Result<T, <T as FromRequest<S>>::Rejection>
|
||||
String
|
||||
axum::body::Bytes
|
||||
axum::http::Request<Body>
|
||||
= note: required for `Extension<NonCloneType>` to implement `FromRequestParts<()>`
|
||||
= note: required for `Extension<NonCloneType>` to implement `FromRequest<(), axum_core::extract::private::ViaParts>`
|
||||
note: required by a bound in `__axum_macros_check_test_extension_non_clone_0_from_request_check`
|
||||
|
||||
Reference in New Issue
Block a user