feat: add #[diagnostic::on_unimplemented] to IntoResponse and IntoResponseParts (#3723)

This commit is contained in:
Dihan Nahdi
2026-04-15 13:06:40 +02:00
committed by GitHub
parent 7be02d7754
commit 309d1bd953
5 changed files with 10 additions and 0 deletions
+3
View File
@@ -109,6 +109,9 @@ use std::{
/// let app = Router::new().route("/", get(|| async { MyBody }));
/// # let _: Router = app;
/// ```
#[diagnostic::on_unimplemented(
note = "See `https://docs.rs/axum/0.8/axum/response/trait.IntoResponse.html` for details"
)]
pub trait IntoResponse {
/// Create a response.
#[must_use]
@@ -70,6 +70,9 @@ use std::{convert::Infallible, fmt};
/// SetHeader("x-foo", "custom")
/// }
/// ```
#[diagnostic::on_unimplemented(
note = "See `https://docs.rs/axum/0.8/axum/response/trait.IntoResponseParts.html` for details"
)]
pub trait IntoResponseParts {
/// The type returned in the event of an error.
///