`ref_patterns` is triggered on generated code
C-bugI-false-positive
### Summary
`ref` is sometimes used by proc macros, notably by https://crates.io/crates/parity-scale-codec-derive.
Considering the main stated concern of the lint being clarity of the code, it simply doesn't apply to generated code annotated with `#[automatically_derived]` attribute.
### Lint Name
ref_patterns
### Reproducer
_No response_
### Version
```text
rustc 1.97.0-nightly (20de910db 2026-05-02)
binary: rustc
commit-hash: 20de910db49d3476ccf49ea79a4b22e2b5dface0
commit-date: 2026-05-02
host: x86_64-unknown-linux-gnu
release: 1.97.0-nightly
LLVM version: 22.1.4
```
### Additional Labels
_No response_
0 条评论