-
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
[single_component_path_imports
] to include super:: and crate::; …
#7190
Conversation
r? @camsteffen |
Thanks for contributing to clippy! We should make sure we don't introduce false negatives where use x; // this should lint
mod a {
use x; // this should not lint
mod b {
fn f() {
super::x::..;
}
}
} Also I'm concerned about performance with collecting This is a little difficult for a first-time contribution, but you are certainly welcome to stick to it! Here is one idea.
Perhaps all of the |
☔ The latest upstream changes (presumably #7254) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage @mautamu. Can you have any updates on this? If you have any questions, feel free to ask us! |
Oh thanks for checking back! Sorry about the delay, I’ll see what I can get done tomorrow. |
ping from triage @mautamu. Can you have any updates on this? |
ping from triage @mautamu. According to the triage procedure, I'm closing this because 2 weeks have passed with no activity. If you have more time to work on this, feel free to reopen this. |
Howdy,
This is my attempt to fix #7168.
I added a tracker variable to [
single_component_path_imports
] for what I'm referring to as "root paths," i.e.crate::*
andsuper::*
. With this, we add another check to filter out those prior to emitting warnings.Let me know what could be done better!
Best,
Mautamu
r? @djc @camsteffen
fixes: #7168
changelog: Don't trigger [
single_component_path_imports
] on an import if crate::import or super::import are invoked.