Skip to content

Can't trace with a variable named "display" #3481

@plrigaux

Description

@plrigaux

Bug Report

Version

│ ├── tracing v0.1.44
│ │ ├── tracing-attributes v0.1.31 (proc-macro)
│ │ └── tracing-core v0.1.36
│ ├── tracing-journald v0.3.2
│ │ ├── tracing-core v0.1.36 ()
│ │ └── tracing-subscriber v0.3.22
│ │ ├── tracing v0.1.44 (
)
│ │ ├── tracing-core v0.1.36 ()
│ │ └── tracing-log v0.2.0
│ │ └── tracing-core v0.1.36 (
)
│ ├── tracing-subscriber v0.3.22 ()
│ ├── tracing v0.1.44 (
)
│ ├── tracing-subscriber v0.3.22 ()
│ │ ├── tracing v0.1.44 (
)
├── tracing v0.1.44 ()
├── tracing-journald v0.3.2 (
)
├── tracing-subscriber v0.3.22 ()
└── tracing v0.1.44 (
)
├── tracing v0.1.44 ()
├── tracing-journald v0.3.2 (
)
└── tracing-subscriber v0.3.22 (*)

Platform

linux aarch 64
Linux 6.18.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Mon, 09 Feb 2026 17:16:33 +0000 x86_64 GNU/Linux

Description

Can't trace/log a message with a variable named "display", there is a confusion inside the macro

let  display = true;
tracing::info!("Show display {}", display) 

The above code doesn't compile. Changing the variable name fixed it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions