-
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_imports
redundant import check false positive with dev-dependency
#121684
Comments
Ok, what I think is going on is that when you run If this is expected behavior then the error message needs to be much clearer. |
Ok, I can mostly patch this by sticking I can remove the import entirely, but then I am left with "example" code which does not actually compile outside of an example/ directory. |
50db03c cargo fmt (Andrew Poelstra) 220f101 ci: screw up imports for rust-lang/rust#121684 (Andrew Poelstra) df069af ci: remove unnecessary imports of `bitcoin` (Andrew Poelstra) 3725549 ci: tighten import of `Vec` (Andrew Poelstra) d441ccd ci: remove imports that are redundant with super::* (Andrew Poelstra) b87b4fb remove sketchy `LikelyFalse` error (Andrew Poelstra) Pull request description: This error would trigger on `l:0` on the basis that this is equivalent to `u:0` but always less efficient. There are no other "linting" errors like this in this library, and the C++ implementation doesn't have it, so we should drop it. Fixes #633 ACKs for top commit: tcharding: ACK 50db03c sanket1729: ACK 50db03c Tree-SHA512: 30681e6abe7957b9fbe059e808d8057fd174ea156d1853960370d2fd63b032a500f85965a5c7424764df76ed804c62d9a781ae38cdc2b123e9b4b53308dd89f5
All The recent extension of |
I tried this code:
Cargo.toml
src/main.rs
If you compile this project with a recent nightly you will see the warning
This warning should not show up, and if it must show up, it should say where the compiler thinks the "redundant import" actually is. Because there is only a single import.
If you comment out the
[dev-dependencies]
part of Cargo.toml the error goes away.The text was updated successfully, but these errors were encountered: