Open fintelia opened 8 months ago
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 #[allow(...)]
these, but they are part of unused_import
and I don't want to blanket allow those. If there's still time, can duplicate imports be their own lint? If there ambiguity that actually matters - i.e., duplicate symbol names are actually different types - that would result in a meaningful compiler error already. This seems like just "busy work".
Yeah this breaks trying to test some software with #![deny(warnings)]
with Miri. Probably something with build-std.
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 deny(warnings)
is in general fragile in that way; it means that your build can be broken by any compiler update.
@chenyukang thanks for taking on the issue, very much a needed feature. Is this still being worked on?
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
deny(warnings)
is in general fragile in that way; it means that your build can be broken by any compiler update.
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: https://github.com/serialport/serialport-rs/blob/84f6066ffd92056829b91771afc7eebcbc6642e2/src/lib.rs#L35
And this time not even deny(warnings)
, but
https://github.com/serialport/serialport-rs/blob/84f6066ffd92056829b91771afc7eebcbc6642e2/src/lib.rs#L23
deny(unused)
Means that serialport-rs doesn't compile on nightly right now.
@chenyukang thanks for taking on the issue, very much a needed feature. Is this still being worked on?
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: