allow_attributes
and allow_attributes_without_reason
triggering on item with "allow" in name
#13463
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Clippy gives warnings for
allow_attributes
andallow_attributes_without_reason
when some objects have "allow" in the name. This only seems to happen, however, when the object in question is followed by "?".Lint Name
allow_attributes, allow_attributes_without_reason
Reproducer
When running
cargo clippy -- --warn clippy::allow_attributes --warn clippy::allow_attributes_without_reason
(on Mac) with this code:It results in these incorrect warnings:
Note that the only difference is propagation with
unwrap()
versus?
that changes the warnings.Version
rustc 1.81.0 (eeb90cda1 2024-09-04)
binary: rustc
commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c
commit-date: 2024-09-04
host: aarch64-apple-darwin
release: 1.81.0
LLVM version: 18.1.7
Additional Labels
No response
The text was updated successfully, but these errors were encountered: