You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When porting from eprintln! to tracing::trace!, my use of the variable name display caused a compile error. I had to change it to to_display. I've tested and the same occurs for debug.
error[[E0277]](https://doc.rust-lang.org/stable/error_codes/E0277.html): `fn(_) -> DisplayValue<_> {display::<_>}` doesn't implement `std::fmt::Display` --> src/main.rs:5:22 |5 | tracing::trace!("{display}"); | ^^^^^^^^^ `fn(_) -> DisplayValue<_> {display::<_>}` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for fn item `fn(_) -> DisplayValue<_> {display::<_>}` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: this error originates in the macro `format_args` which comes from the expansion of the macro `tracing::trace` (in Nightly builds, run with -Z macro-backtrace for more info)
Bug Report
Version
tracing 0.1.37
(latest)Platform
Linux
Description
When porting from
eprintln!
totracing::trace!
, my use of the variable namedisplay
caused a compile error. I had to change it toto_display
. I've tested and the same occurs fordebug
.Rust playground
The text was updated successfully, but these errors were encountered: