-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
unused-extern-crates causes false positive with macro_use #30849
Comments
This is why the lint is allow-by-default, it's got false positives |
Sure, but that doesn't mean some of them can't be fixed. |
Is this the right place to look at? |
On IRC about this:
|
It's actually possible to silence the error by adding If/when we move name resolution earlier and use it during macro expansion, the macro will actually be imported through the |
#39060 improved this. CC @jseyfried |
Now that macro modularization is implemented, this is true today!
For the record, this changed in #37247 to support |
Make unused-extern-crate warn-by-default Apart from enabling the lint, this pull request also removes existing unused crates in the codebase, and fix some amount of false positives on crates with special purposes. Now that all false positive issues are closed, it should be possible to make it available to wider users. Quote: > Now that macro modularization is implemented, this is true today! *#30849 (comment) Concerns: can break some `#[deny(warnings)]`. Close #42591
For example, it warns for
bitflags
/lazy_static
even when those macros are used in the crate.The text was updated successfully, but these errors were encountered: