-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enhance macro_use_imports lint with a auto applicable suggstion #5275
Comments
I have made a rough start on this here. I had a few questions. If the import is only the crate name (no more I'm sure there are other things I'm not doing correctly, should I move this to a PR? |
I must admit, that I don't really know, how I would handle this. I think that rust-clippy/tests/ui/wildcard_imports.rs Lines 1 to 8 in 3d0f0e3
What I would suggest is to first write a huge test base, with every case you can think of, and then work from there. If you have an idea for a test case, but don't know how to implement it in the Clippy test suite, you can open a PR, and we can work it out together. |
Macro use sugg changelog: Add auto applicable suggstion to macro_use_imports fixes #5275 <s>Where exactly is the `wildcard_imports_helper` I haven't been able to import anything ex. `use lazy_static;` or something like for that I get version/compiler conflicts?</s> Found it. Should we also check for `#[macro_use] extern crate`, although this is still depended on for stuff like `rustc_private`?
Macro use sugg changelog: Add auto applicable suggstion to macro_use_imports fixes #5275 <s>Where exactly is the `wildcard_imports_helper` I haven't been able to import anything ex. `use lazy_static;` or something like for that I get version/compiler conflicts?</s> Found it. Should we also check for `#[macro_use] extern crate`, although this is still depended on for stuff like `rustc_private`?
The
macro_use_imports
lint was implemented in #5230, but is currently missing a auto applicable suggestion. For this suggestion, every macro used in the module would have been detected and from this set of macros, a suggestion has to be build.The text was updated successfully, but these errors were encountered: