-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work on
Description
When the useless_attribute lint is activated, it says that you most likely forgot an exclamation mark (!). While this is true, it also suggests to stick the ! in the middle of the attribute:
warning: useless lint attribute, #[warn(useless_attribute)] on by default
--> src/lib.rs:1:38
|
1 | #[cfg_attr(feature = "cargo-clippy", allow(new_without_default))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: if you just forgot a `!`, use
| #[cfg_attr(feature = "cargo-clippy", a!llow(new_without_default))]
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#useless_attribute
The correct response should be to suggest adding it after the #
I'm using the latest clippy on the latest nightly Rust.
peng1999 and oli-obk
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work on