Open
Description
I tried the code from #6234.
I expected to see one error, from the incorrect 'fixed' code, and one warning from the original code.
Instead, this happened: I saw one error and two warnings:
Original diagnostics will follow.
warning: immediately dereferencing a reference
--> src/lib.rs:2:26
|
2 | ($visitor: expr) => (*&$visitor)
| ^^^^^^^^^^ help: try this: `self`
...
8 | m!(self)
| -------- in this macro invocation
|
= note: `#[warn(clippy::deref_addrof)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: immediately dereferencing a reference
--> src/lib.rs:2:26
|
2 | ($visitor: expr) => (*&$visitor)
| ^^^^^^^^^^ help: try this: `self`
...
8 | m!(self)
| -------- in this macro invocation
|
= note: `#[warn(clippy::deref_addrof)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#deref_addrof
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
warning: 1 warning emitted
warning: 1 warning emitted
Meta
cargo clippy -V
: clippy 0.0.212 (ffa2e7a 2020-10-24)