Skip to content

Useless lint attribute is not useless (unused_imports) #2607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spease opened this issue Apr 1, 2018 · 1 comment
Closed

Useless lint attribute is not useless (unused_imports) #2607

spease opened this issue Apr 1, 2018 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@spease
Copy link

spease commented Apr 1, 2018

error: useless lint attribute
  --> serde_python/src/lib.rs:12:1
   |
12 | #[allow(unused_imports)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(unused_imports)]`
   |
   = note: #[deny(useless_attribute)] on by default
   = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.191/index.html#useless_attribute

error: aborting due to previous error

However, this actually does suppress a warning for just that import.

@phansch phansch added the C-bug Category: Clippy is not doing the correct thing label Apr 1, 2018
@dtolnay
Copy link
Member

dtolnay commented May 14, 2018

Closing as a duplicate of #1938.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

3 participants