-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Lint for unused extern mod
#10385
Comments
This would be a bit tricky because currently every program links to the That being said, we have lots of lints for other unused things, so why not |
Hello, |
…richton This PR creates a new lint : ``unused_extern_crate``, which do pretty much the same thing as ``unused_import``, but for ``extern crate`` statements. It is related to feature request #10385. I adapted the code tracking used imports so that it tracks extern crates usage as well. This was mainly trial and error and while I believe all cases are covered, there might be some code I added that is useless (long compile times didn't give me the opportunity to check this in detail). Also, I removed some unused ``extern crate`` statements from the libs, that where spotted by this new lint.
So I think this is done. Thank you, @vberger! |
Update readme description of `restriction` lints to dissuade casual use. Adds some stronger wording about not enabling `restriction` lints. I've seen it come up a few times where people are confused about what the `restriction` category is for and end up casually enabling lints from it (or the whole category). changelog: None
The lint table and the restriction group description was improved in rust-lang#10385, but only in the README. Apply the same changes to the book.
Consistent lint group table in book and README The lint table and the restriction group description was improved in rust-lang#10385, but only in the README. Apply the same changes to the book. r? `@xFrednet` I noticed that I left review comments about this in rust-lang#10385, but never submitted them. So to this day they are listed as "pending" in the GitHub UI. This is just copy and paste of the current README file on `master`. changelog: none
Would be good if rustc prints lint warning for
unused extern mod
.The text was updated successfully, but these errors were encountered: