-
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
"item TryFrom
is imported redundantly" doesn't have automatic fix
#121315
Comments
I'm wondering if this condition is even worth the lint. We recently hit this on a very large code base and fixing them all - especially without automatic fix-ups - is counterproductive to any benefit I can imagine. Most were from adding some types to our various crates' preludes and all the source that imported both wasn't cleaned up. Didn't need to until now. I'd love to just |
Yeah this breaks trying to test some software with |
I agree with the original report that it would be really valuable to have a fix for this — it turns a potentially large annoyance into a quick fix. @RossSmyth |
…-removing, r=<try> Merge RedundantImport into UnusedImport for suggesting removing spans Fixes rust-lang#121315 I also changed the label of diagnostics for RedundantImport to be compatible with UnusedImport, or any other better ways? r? `@petrochenkov`
@chenyukang thanks for taking on the issue, very much a needed feature. Is this still being worked on? |
Yeah, I don't have it enabled but wrenching on some other crates they do. |
Another failure spotted in the wild: Because of this line: And this time not even Means that serialport-rs doesn't compile on nightly right now. |
sorry, there are some delays, I will continue to work on it. |
Recently rustc starting warning on imports of
TryFrom
that are redundant with the prelude.produces:
Sadly, there's no automatic fix suggested here. For a single case it isn't too bad to do manually, but in a larger project the output may look more like:
The text was updated successfully, but these errors were encountered: