Files
axum/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr
T

61 lines
2.5 KiB
Plaintext

error[E0277]: the trait bound `Struct: serde::Deserialize<'de>` is not satisfied
--> tests/debug_handler/fail/json_not_deserialize.rs:7:24
|
7 | async fn handler(_foo: Json<Struct>) {}
| ^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`
--> tests/debug_handler/fail/json_not_deserialize.rs:4:1
|
4 | struct Struct {}
| ^^^^^^^^^^^^^
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `Struct` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a serde_json::raw::RawValue
&'a std::path::Path
&'a str
()
(T,)
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `Struct` to implement `serde_core::de::DeserializeOwned`
= note: required for `Json<Struct>` to implement `FromRequest<()>`
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
1 + #![feature(trivial_bounds)]
|
error[E0277]: the trait bound `Struct: serde::Deserialize<'de>` is not satisfied
--> tests/debug_handler/fail/json_not_deserialize.rs:7:24
|
7 | async fn handler(_foo: Json<Struct>) {}
| ^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`
--> tests/debug_handler/fail/json_not_deserialize.rs:4:1
|
4 | struct Struct {}
| ^^^^^^^^^^^^^
= note: for local types consider adding `#[derive(serde::Deserialize)]` to your `Struct` type
= note: for types from other crates check whether the crate offers a `serde` feature flag
= help: the following other types implement trait `serde_core::de::Deserialize<'de>`:
&'a [u8]
&'a serde_json::raw::RawValue
&'a std::path::Path
&'a str
()
(T,)
(T0, T1)
(T0, T1, T2)
and $N others
= note: required for `Struct` to implement `serde_core::de::DeserializeOwned`
= note: required for `Json<Struct>` to implement `FromRequest<()>`
note: required by a bound in `__axum_macros_check_handler_0_from_request_check`
--> tests/debug_handler/fail/json_not_deserialize.rs:7:24
|
7 | async fn handler(_foo: Json<Struct>) {}
| ^^^^^^^^^^^^ required by this bound in `__axum_macros_check_handler_0_from_request_check`