Re: [PATCH 12/19] rust: replace `clippy::dbg_macro` with `disallowed_macros`
From: Miguel Ojeda
Date: Thu Oct 03 2024 - 14:45:03 EST
On Sun, Sep 15, 2024 at 1:10 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> `#[]` would apply to the next item/statement, and `#![]` would apply to
> the surrouding scope. In this case there's just a single statement so
> they should be equivalent.
>
> Miguel, is this change from `#[]` to `#![]` intentional?
Yeah, it is intentional -- it is what the last paragraph in the commit
message refers to.
I think this is e.g. https://github.com/rust-lang/rust/issues/87391
and https://github.com/rust-lang/rust-clippy/issues/10355:
note: the built-in attribute `expect` will be ignored, since it's
applied to the macro invocation `assert_eq`
In addition, `disallowed_macros` also has some false negatives I
noticed back when I started playing with this:
https://github.com/rust-lang/rust-clippy/issues/11431
Cheers,
Miguel