Skip to content

tracing 0.1.42 breaks unqualified use of debug and display in macros #3424

@hds

Description

@hds

Bug Report

Up to tracing 0.1.41, this works:

    let foo = Some(42);
    let bar = true;

    tracing::info!(foo = debug(foo), bar = display(bar));

However, from tracing 0.1.42 (due to #3382), it fails to compile:

error[E0425]: cannot find function `debug` in this scope
  --> src/main.rs:12:26
   |
12 |     tracing::info!(foo = debug(foo), bar = display(bar));
   |                          ^^^^^ not found in this scope
   |
help: consider importing this function
   |
 1 + use tracing::field::debug;
   |

error[E0425]: cannot find function `display` in this scope
  --> src/main.rs:12:44
   |
12 |     tracing::info!(foo = debug(foo), bar = display(bar));
   |                                            ^^^^^^^ not found in this scope
   |
help: consider importing this function
   |
 1 + use tracing::field::display;
   |

For more information about this error, try `rustc --explain E0425`.

Version

  • tracing 0.1.42

Platform

all

Crates

  • tracing

Notes

Release train: #3413
Release PR: #3418

Metadata

Metadata

Assignees

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