mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-24 00:00:16 +02:00
Update span for FromRequest impls to point to callsite
This commit is contained in:
@@ -84,7 +84,7 @@ fn expand_named_fields(ident: &syn::Ident, path: LitStr, segments: &[Segment]) -
|
||||
}
|
||||
};
|
||||
|
||||
let from_request_impl = quote_spanned! {path.span()=>
|
||||
let from_request_impl = quote! {
|
||||
#[::axum::async_trait]
|
||||
#[automatically_derived]
|
||||
impl<B> ::axum::extract::FromRequest<B> for #ident
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
error[E0277]: the trait bound `for<'de> MyPath: serde::de::Deserialize<'de>` is not satisfied
|
||||
--> tests/typed_path/fail/not_deserialize.rs:4:14
|
||||
--> tests/typed_path/fail/not_deserialize.rs:3:10
|
||||
|
|
||||
4 | #[typed_path("/users/:id")]
|
||||
| ^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `MyPath`
|
||||
3 | #[derive(TypedPath)]
|
||||
| ^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `MyPath`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `serde::de::DeserializeOwned` for `MyPath`
|
||||
= note: required because of the requirements on the impl of `FromRequest<B>` for `axum::extract::Path<MyPath>`
|
||||
= note: this error originates in the derive macro `TypedPath` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Reference in New Issue
Block a user