Open
Description
Bug Report
Version
tracing 0.1.16
Description
Clippy's deref-addrof
lint is unhappy with uses of event!
macro in the new tracing 0.1.16
. It was fine in tracing 0.1.15
.
use tracing::{event, Level};
fn banana(message: &str) {
event!(Level::ERROR, %message);
}
[package]
name = "banana"
version = "0.1.0"
edition = "2018"
[dependencies]
tracing = { version = "=0.1.16", features = ["log-always"] }
$ cargo clippy -- -Dclippy::deref-addrof
Updating crates.io index
Checking banana v0.1.0 (/tmp/banana)
error: immediately dereferencing a reference
--> src/lib.rs:4:5
|
4 | event!(Level::ERROR, %message);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: requested on the command line with `-D clippy::deref-addrof`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error