From 7f203b96e6b28b1d5ff7501f8824c72a13725bf1 Mon Sep 17 00:00:00 2001
From: David Pedersen <david.pdrsn@gmail.com>
Date: Mon, 20 Jun 2022 09:14:21 +0200
Subject: [PATCH] Fix build with `form` feature without `headers` feature
 (#1107)

Fixes #1106
---
 axum/CHANGELOG.md | 3 ++-
 axum/src/lib.rs   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md
index 157f5eb8..570a2d5a 100644
--- a/axum/CHANGELOG.md
+++ b/axum/CHANGELOG.md
@@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 # Unreleased
 
-- None.
+- **fixed:** Fix compile error when the `headers` is enabled and the `form`
+  feature is disabled
 
 # 0.5.8 (18. June, 2022)
 
diff --git a/axum/src/lib.rs b/axum/src/lib.rs
index 7fbf51c2..c5f19505 100644
--- a/axum/src/lib.rs
+++ b/axum/src/lib.rs
@@ -437,8 +437,8 @@ pub use self::routing::Router;
 pub use self::typed_header::TypedHeader;
 
 #[doc(inline)]
-#[cfg(feature = "headers")]
-pub use form::Form;
+#[cfg(feature = "form")]
+pub use self::form::Form;
 
 #[doc(inline)]
 pub use axum_core::{BoxError, Error};