diff --git a/tracing/src/lib.rs b/tracing/src/lib.rs index 6aab806027..88649e230f 100644 --- a/tracing/src/lib.rs +++ b/tracing/src/lib.rs @@ -936,6 +936,7 @@ pub mod __macro_support { sync::atomic::{AtomicUsize, Ordering}, }; use crate::{subscriber::Interest, Metadata}; + pub use core::concat; use tracing_core::Once; /// Callsite implementation used by macro-generated code. diff --git a/tracing/src/macros.rs b/tracing/src/macros.rs index af91eeca93..d5bbe80169 100644 --- a/tracing/src/macros.rs +++ b/tracing/src/macros.rs @@ -592,7 +592,7 @@ macro_rules! event { if $crate::level_enabled!($lvl) { use $crate::__macro_support::*; static CALLSITE: $crate::__macro_support::MacroCallsite = $crate::callsite2! { - name: concat!( + name: $crate::__macro_support::concat!( "event ", file!(), ":", @@ -639,7 +639,7 @@ macro_rules! event { if $crate::level_enabled!($lvl) { use $crate::__macro_support::*; static CALLSITE: $crate::__macro_support::MacroCallsite = $crate::callsite2! { - name: concat!( + name: $crate::__macro_support::concat!( "event ", file!(), ":", @@ -2171,7 +2171,7 @@ macro_rules! __tracing_log { macro_rules! __mk_format_string { // === base case === (@ { $(,)* $($out:expr),* $(,)* } $(,)*) => { - concat!( $($out),*) + $crate::__macro_support::concat!( $($out),*) }; // === recursive case (more tts), ===