From 72e820f6fabeae85ec8af04b28ffd2894ae278aa Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 20:31:17 +0200 Subject: [PATCH] Bump nightly for axum-macros (#3500) --- axum-macros/rust-toolchain | 2 +- .../fail/argument_not_extractor.stderr | 2 +- .../fail/extension_not_clone.stderr | 2 +- .../fail/json_not_deserialize.stderr | 14 +++- .../tests/debug_handler/fail/not_send.stderr | 2 +- .../fail/output_tuple_too_many.stderr | 12 +-- .../fail/single_wrong_return_tuple.stderr | 7 +- .../fail/too_many_extractors.stderr | 12 +-- .../fail/wrong_return_tuple.stderr | 16 +++- .../fail/generic_without_via.stderr | 38 +++++----- .../fail/generic_without_via_rejection.stderr | 38 +++++----- ...rride_rejection_on_enum_without_via.stderr | 76 +++++++++---------- .../fail/parts_extracting_body.stderr | 6 ++ .../typed_path/fail/missing_capture.stderr | 4 + .../typed_path/fail/not_deserialize.stderr | 59 ++++++++------ 15 files changed, 170 insertions(+), 120 deletions(-) diff --git a/axum-macros/rust-toolchain b/axum-macros/rust-toolchain index eca143c7..c55fe8ed 100644 --- a/axum-macros/rust-toolchain +++ b/axum-macros/rust-toolchain @@ -1 +1 @@ -nightly-2024-06-22 +nightly-2025-09-28 diff --git a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr b/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr index 56a4fff5..127e93ef 100644 --- a/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr +++ b/axum-macros/tests/debug_handler/fail/argument_not_extractor.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `bool: FromRequest<(), axum_core::extract::private --> tests/debug_handler/fail/argument_not_extractor.rs:4:24 | 4 | async fn handler(_foo: bool) {} - | ^^^^ the trait `FromRequestParts<()>` is not implemented for `bool`, which is required by `bool: FromRequest<(), _>` + | ^^^^ the trait `FromRequestParts<()>` is not implemented for `bool` | = note: Function argument is not a valid axum extractor. See `https://docs.rs/axum/0.8/axum/extract/index.html` for details diff --git a/axum-macros/tests/debug_handler/fail/extension_not_clone.stderr b/axum-macros/tests/debug_handler/fail/extension_not_clone.stderr index 81bec918..3514a788 100644 --- a/axum-macros/tests/debug_handler/fail/extension_not_clone.stderr +++ b/axum-macros/tests/debug_handler/fail/extension_not_clone.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `NonCloneType: Clone` is not satisfied --> tests/debug_handler/fail/extension_not_clone.rs:7:38 | 7 | async fn test_extension_non_clone(_: Extension) {} - | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NonCloneType`, which is required by `Extension: FromRequest<(), _>` + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `NonCloneType` | = help: the following other types implement trait `FromRequest`: (T1, T2) diff --git a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr index a4b0cf95..d50c8c3a 100644 --- a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr +++ b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr @@ -2,8 +2,13 @@ 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) {} - | ^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` + | ^^^^^^^^^^^^ 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>`: @@ -28,8 +33,13 @@ 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) {} - | ^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` + | ^^^^^^^^^^^^ 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>`: diff --git a/axum-macros/tests/debug_handler/fail/not_send.stderr b/axum-macros/tests/debug_handler/fail/not_send.stderr index 13ab83dd..2e2cede3 100644 --- a/axum-macros/tests/debug_handler/fail/not_send.stderr +++ b/axum-macros/tests/debug_handler/fail/not_send.stderr @@ -4,7 +4,7 @@ error: future cannot be sent between threads safely 3 | #[debug_handler] | ^^^^^^^^^^^^^^^^ future returned by `handler` is not `Send` | - = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>`, which is required by `impl Future: Send` + = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` note: future is not `Send` as this value is used across an await --> tests/debug_handler/fail/not_send.rs:6:14 | diff --git a/axum-macros/tests/debug_handler/fail/output_tuple_too_many.stderr b/axum-macros/tests/debug_handler/fail/output_tuple_too_many.stderr index fb31388a..28f787e0 100644 --- a/axum-macros/tests/debug_handler/fail/output_tuple_too_many.stderr +++ b/axum-macros/tests/debug_handler/fail/output_tuple_too_many.stderr @@ -1,11 +1,11 @@ error: Cannot return tuples with more than 17 elements - --> tests/debug_handler/fail/output_tuple_too_many.rs:4:20 - | -4 | async fn handler() -> ( + --> tests/debug_handler/fail/output_tuple_too_many.rs:4:20 + | + 4 | async fn handler() -> ( | ____________________^ -5 | | axum::http::StatusCode, -6 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, -7 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, + 5 | | axum::http::StatusCode, + 6 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, + 7 | | AppendHeaders<[(axum::http::HeaderName, &'static str); 1]>, ... | 23 | | axum::http::StatusCode, 24 | | ) { diff --git a/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr b/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr index 89093735..835de128 100644 --- a/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr +++ b/axum-macros/tests/debug_handler/fail/single_wrong_return_tuple.stderr @@ -2,8 +2,13 @@ error[E0277]: the trait bound `NotIntoResponse: IntoResponse` is not satisfied --> tests/debug_handler/fail/single_wrong_return_tuple.rs:6:23 | 6 | async fn handler() -> (NotIntoResponse) { - | ^^^^^^^^^^^^^^^^^ the trait `IntoResponse` is not implemented for `NotIntoResponse` + | ^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `IntoResponse` is not implemented for `NotIntoResponse` + --> tests/debug_handler/fail/single_wrong_return_tuple.rs:3:1 + | +3 | struct NotIntoResponse; + | ^^^^^^^^^^^^^^^^^^^^^^ = help: the following other types implement trait `IntoResponse`: &'static [u8; N] &'static [u8] diff --git a/axum-macros/tests/debug_handler/fail/too_many_extractors.stderr b/axum-macros/tests/debug_handler/fail/too_many_extractors.stderr index 2cf6486b..f867d7cb 100644 --- a/axum-macros/tests/debug_handler/fail/too_many_extractors.stderr +++ b/axum-macros/tests/debug_handler/fail/too_many_extractors.stderr @@ -1,10 +1,10 @@ error: Handlers cannot take more than 16 arguments. Use `(a, b): (ExtractorA, ExtractorA)` to further nest extractors - --> tests/debug_handler/fail/too_many_extractors.rs:6:5 - | -6 | / _e1: Uri, -7 | | _e2: Uri, -8 | | _e3: Uri, -9 | | _e4: Uri, + --> tests/debug_handler/fail/too_many_extractors.rs:6:5 + | + 6 | / _e1: Uri, + 7 | | _e2: Uri, + 8 | | _e3: Uri, + 9 | | _e4: Uri, ... | 21 | | _e16: Uri, 22 | | _e17: Uri, diff --git a/axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr b/axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr index 8779d358..abc2b6e5 100644 --- a/axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr +++ b/axum-macros/tests/debug_handler/fail/wrong_return_tuple.stderr @@ -8,8 +8,13 @@ error[E0277]: the trait bound `CustomIntoResponse: IntoResponseParts` is not sat --> tests/debug_handler/fail/wrong_return_tuple.rs:21:5 | 21 | CustomIntoResponse, - | ^^^^^^^^^^^^^^^^^^ the trait `IntoResponseParts` is not implemented for `CustomIntoResponse` + | ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `IntoResponseParts` is not implemented for `CustomIntoResponse` + --> tests/debug_handler/fail/wrong_return_tuple.rs:12:1 + | +12 | struct CustomIntoResponse {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: the following other types implement trait `IntoResponseParts`: () (T1, T2) @@ -23,15 +28,20 @@ error[E0277]: the trait bound `CustomIntoResponse: IntoResponseParts` is not sat = help: see issue #48214 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | -3 + #![feature(trivial_bounds)] + 3 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `CustomIntoResponse: IntoResponseParts` is not satisfied --> tests/debug_handler/fail/wrong_return_tuple.rs:21:5 | 21 | CustomIntoResponse, - | ^^^^^^^^^^^^^^^^^^ the trait `IntoResponseParts` is not implemented for `CustomIntoResponse` + | ^^^^^^^^^^^^^^^^^^ unsatisfied trait bound | +help: the trait `IntoResponseParts` is not implemented for `CustomIntoResponse` + --> tests/debug_handler/fail/wrong_return_tuple.rs:12:1 + | +12 | struct CustomIntoResponse {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: the following other types implement trait `IntoResponseParts`: () (T1, T2) diff --git a/axum-macros/tests/from_request/fail/generic_without_via.stderr b/axum-macros/tests/from_request/fail/generic_without_via.stderr index daabab09..f45350de 100644 --- a/axum-macros/tests/from_request/fail/generic_without_via.stderr +++ b/axum-macros/tests/from_request/fail/generic_without_via.stderr @@ -5,23 +5,23 @@ error: #[derive(FromRequest)] only supports generics when used with #[from_reque | ^ error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future {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 {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`: - `Layered` implements `Handler` - `MethodRouter` implements `Handler<(), S>` + --> 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 {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`: + `Layered` implements `Handler` + `MethodRouter` implements `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 a bound in this function - | 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) + --> $WORKSPACE/axum/src/routing/method_routing.rs + | + | top_level_handler_fn!(get, GET); + | ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^ + | | | + | | required by a bound in this function + | 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) diff --git a/axum-macros/tests/from_request/fail/generic_without_via_rejection.stderr b/axum-macros/tests/from_request/fail/generic_without_via_rejection.stderr index 66f90281..fe123895 100644 --- a/axum-macros/tests/from_request/fail/generic_without_via_rejection.stderr +++ b/axum-macros/tests/from_request/fail/generic_without_via_rejection.stderr @@ -5,23 +5,23 @@ error: #[derive(FromRequest)] only supports generics when used with #[from_reque | ^ error[E0277]: the trait bound `fn(Extractor<()>) -> impl Future {foo}: Handler<_, _>` is not satisfied - --> tests/from_request/fail/generic_without_via_rejection.rs:11:44 - | -11 | _ = Router::<()>::new().route("/", get(foo)); - | --- ^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Extractor<()>) -> impl Future {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`: - `Layered` implements `Handler` - `MethodRouter` implements `Handler<(), S>` + --> tests/from_request/fail/generic_without_via_rejection.rs:11:44 + | + 11 | _ = Router::<()>::new().route("/", get(foo)); + | --- ^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(Extractor<()>) -> impl Future {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`: + `Layered` implements `Handler` + `MethodRouter` implements `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 a bound in this function - | 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) + --> $WORKSPACE/axum/src/routing/method_routing.rs + | + | top_level_handler_fn!(get, GET); + | ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^ + | | | + | | required by a bound in this function + | 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) diff --git a/axum-macros/tests/from_request/fail/override_rejection_on_enum_without_via.stderr b/axum-macros/tests/from_request/fail/override_rejection_on_enum_without_via.stderr index e70248f3..5b4c2ea7 100644 --- a/axum-macros/tests/from_request/fail/override_rejection_on_enum_without_via.stderr +++ b/axum-macros/tests/from_request/fail/override_rejection_on_enum_without_via.stderr @@ -5,45 +5,45 @@ error: cannot use `rejection` without `via` | ^^^^^^^^^ error[E0277]: the trait bound `fn(MyExtractor) -> impl Future {handler}: Handler<_, _>` is not satisfied - --> tests/from_request/fail/override_rejection_on_enum_without_via.rs:10:50 - | -10 | let _: Router = Router::new().route("/", get(handler).post(handler_result)); - | --- ^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(MyExtractor) -> impl Future {handler}` - | | - | 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`: - `Layered` implements `Handler` - `MethodRouter` implements `Handler<(), S>` + --> tests/from_request/fail/override_rejection_on_enum_without_via.rs:10:50 + | + 10 | let _: Router = Router::new().route("/", get(handler).post(handler_result)); + | --- ^^^^^^^ the trait `Handler<_, _>` is not implemented for fn item `fn(MyExtractor) -> impl Future {handler}` + | | + | 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`: + `Layered` implements `Handler` + `MethodRouter` implements `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 a bound in this function - | 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) + --> $WORKSPACE/axum/src/routing/method_routing.rs + | + | top_level_handler_fn!(get, GET); + | ^^^^^^^^^^^^^^^^^^^^^^---^^^^^^ + | | | + | | required by a bound in this function + | 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) error[E0277]: the trait bound `fn(Result) -> impl Future {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) -> impl Future {handler_result}` - | | - | 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`: - `Layered` implements `Handler` - `MethodRouter` implements `Handler<(), S>` + --> 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) -> impl Future {handler_result}` + | | + | 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`: + `Layered` implements `Handler` + `MethodRouter` implements `Handler<(), S>` note: required by a bound in `MethodRouter::::post` - --> $WORKSPACE/axum/src/routing/method_routing.rs - | - | chained_handler_fn!(post, POST); - | ^^^^^^^^^^^^^^^^^^^^----^^^^^^^ - | | | - | | required by a bound in this associated function - | required by this bound in `MethodRouter::::post` - = note: this error originates in the macro `chained_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info) + --> $WORKSPACE/axum/src/routing/method_routing.rs + | + | chained_handler_fn!(post, POST); + | ^^^^^^^^^^^^^^^^^^^^----^^^^^^^ + | | | + | | required by a bound in this associated function + | required by this bound in `MethodRouter::::post` + = note: this error originates in the macro `chained_handler_fn` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/axum-macros/tests/from_request/fail/parts_extracting_body.stderr b/axum-macros/tests/from_request/fail/parts_extracting_body.stderr index 3008270f..c76f853e 100644 --- a/axum-macros/tests/from_request/fail/parts_extracting_body.stderr +++ b/axum-macros/tests/from_request/fail/parts_extracting_body.stderr @@ -16,3 +16,9 @@ error[E0277]: the trait bound `String: FromRequestParts<_>` is not satisfied `(T1, T2, T3, T4, T5, T6, T7)` implements `FromRequestParts` `(T1, T2, T3, T4, T5, T6, T7, T8)` implements `FromRequestParts` and $N others + +error[E0282]: type annotations needed + --> tests/from_request/fail/parts_extracting_body.rs:5:11 + | +5 | body: String, + | ^^^^^^ cannot infer type diff --git a/axum-macros/tests/typed_path/fail/missing_capture.stderr b/axum-macros/tests/typed_path/fail/missing_capture.stderr index 85865a52..5835fb1f 100644 --- a/axum-macros/tests/typed_path/fail/missing_capture.stderr +++ b/axum-macros/tests/typed_path/fail/missing_capture.stderr @@ -10,5 +10,9 @@ help: include the missing field in the pattern | ++++++ help: if you don't care about this missing field, you can explicitly ignore it | +5 | #[typed_path("/users" { id: _ })] + | +++++++++ +help: or always ignore missing fields here + | 5 | #[typed_path("/users" { .. })] | ++++++ diff --git a/axum-macros/tests/typed_path/fail/not_deserialize.stderr b/axum-macros/tests/typed_path/fail/not_deserialize.stderr index 4534b19e..fd817973 100644 --- a/axum-macros/tests/typed_path/fail/not_deserialize.stderr +++ b/axum-macros/tests/typed_path/fail/not_deserialize.stderr @@ -1,9 +1,39 @@ +error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satisfied + --> tests/typed_path/fail/not_deserialize.rs:3:10 + | +3 | #[derive(TypedPath)] + | ^^^^^^^^^ unsatisfied trait bound + | +help: the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath` + --> tests/typed_path/fail/not_deserialize.rs:5:1 + | +5 | struct MyPath { + | ^^^^^^^^^^^^^ + = 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 `MyPath` to implement `serde_core::de::DeserializeOwned` + = note: required for `axum::extract::Path` to implement `FromRequestParts` + = note: this error originates in the derive macro `TypedPath` (in Nightly builds, run with -Z macro-backtrace for more info) + error[E0277]: the trait bound `MyPath: serde::Deserialize<'de>` is not satisfied --> tests/typed_path/fail/not_deserialize.rs:3:10 | 3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` + | ^^^^^^^^^ unsatisfied trait bound | +help: the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath` + --> tests/typed_path/fail/not_deserialize.rs:5:1 + | +5 | struct MyPath { + | ^^^^^^^^^^^^^ = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `MyPath` 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>`: @@ -23,8 +53,13 @@ error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satis --> tests/typed_path/fail/not_deserialize.rs:3:10 | 3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` + | ^^^^^^^^^ unsatisfied trait bound | +help: the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath` + --> tests/typed_path/fail/not_deserialize.rs:5:1 + | +5 | struct MyPath { + | ^^^^^^^^^^^^^ = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue @@ -37,23 +72,3 @@ error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satis and $N others = note: required for `MyPath` to implement `serde_core::de::DeserializeOwned` = note: required for `axum::extract::Path` to implement `FromRequestParts` - -error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satisfied - --> tests/typed_path/fail/not_deserialize.rs:3:10 - | -3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` - | - = 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 `MyPath` to implement `serde_core::de::DeserializeOwned` - = note: required for `axum::extract::Path` to implement `FromRequestParts` - = note: this error originates in the derive macro `TypedPath` (in Nightly builds, run with -Z macro-backtrace for more info)