From 287bd147113f4eb0b5471b990b5a8fdc8bfa6e43 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 27 Dec 2024 11:39:08 +0100 Subject: [PATCH] axum-core/macros: Change `$body` to require `literal` token (#3117) --- axum-core/src/macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum-core/src/macros.rs b/axum-core/src/macros.rs index 7bca8be9..1c035160 100644 --- a/axum-core/src/macros.rs +++ b/axum-core/src/macros.rs @@ -38,7 +38,7 @@ macro_rules! __log_rejection { macro_rules! __define_rejection { ( #[status = $status:ident] - #[body = $body:expr] + #[body = $body:literal] $(#[$m:meta])* pub struct $name:ident; ) => { @@ -89,7 +89,7 @@ macro_rules! __define_rejection { ( #[status = $status:ident] - #[body = $body:expr] + #[body = $body:literal] $(#[$m:meta])* pub struct $name:ident (Error); ) => {