-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Description
Consider code like this:
#[allow(clippy::integer_arithmetic)] // cannot overflow
return discriminant << data_size | data;
The return
is needed here because attributes can only be applied to statements, not expressions. But nevertheless clippy says I should remove the return
...
Version
rustc 1.65.0-nightly (4b695f7c4 2022-08-21)
binary: rustc
commit-hash: 4b695f7c4e1a02d160fe7e159abd0f87027c0fcf
commit-date: 2022-08-21
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have