diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index cf520f88..ceb6f404 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -42,6 +42,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 without any routes will now result in a panic. Previously, this just did nothing. [#1327] +## Extractors + +- **added:** `FromRequest` and `FromRequestParts` derive macro re-exports from [`axum-macros`] behind the `macros` feature ([#1352]) + +[`axum-macros`]: https://docs.rs/axum-macros/latest/axum_macros/ +[#1352]: https://github.com/tokio-rs/axum/pull/1352 + ## Middleware - **added**: Add `middleware::from_fn_with_state` and diff --git a/axum/src/extract/mod.rs b/axum/src/extract/mod.rs index 76e780b2..c6e8bf53 100644 --- a/axum/src/extract/mod.rs +++ b/axum/src/extract/mod.rs @@ -18,6 +18,9 @@ mod state; #[doc(inline)] pub use axum_core::extract::{DefaultBodyLimit, FromRef, FromRequest, FromRequestParts}; +#[cfg(feature = "macros")] +pub use axum_macros::{FromRequest, FromRequestParts}; + #[doc(inline)] #[allow(deprecated)] pub use self::{