Closed
Description
Version
tracing v0.1.40
├── tracing-attributes v0.1.27 (proc-macro)
└── tracing-core v0.1.32
Platform
macOS 13.6
Darwin HAMACL00492 22.6.0 Darwin Kernel Version 22.6.0: Tue Nov 7 21:40:08 PST 2023; root:xnu-8796.141.3.702.9~2/RELEASE_ARM64_T6000 arm64
stable-aarch64-apple-darwin (default)
rustc 1.74.1 (a28077b28 2023-12-04)
Description
I expected the following sample to compile. The problem is the same on all the different log levels (I tried only info, warn and error)
const FOO: &str = "foo";
fn main() {
tracing::info!(bar = 42, { FOO } = 23, "tada"); // works
tracing::event!(tracing::Level::INFO, { FOO } = 23, bar = 42, "tada"); // works, too
tracing::info!({ FOO } = 23, bar = 42, "tada"); // doesn't compile
}
Metadata
Metadata
Assignees
Labels
No labels