-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
False positives for dev-dependencies with unused_crate_dependencies lint #72686
Comments
cc @jsgf |
Fixed in #72702. |
Yeah this is the reason it's not on by default. We still need to work out if/how it can be used with cargo in a reasonable way. Adding it to |
@svartalf Though TBH I'm a bit confused - what targets is Cargo passing dev-dependencies to aside from tests? I would have thought your case would be OK. Hm, I think there may be another bug that |
As far as I can tell, this issue wasn't fixed, The functionality of See #57274 |
unused_crate_dependencies
lint introduced in #72342 causes false positives for[dev-dependencies]
.To reproduce:
I expected to execute
cargo +nightly test
correctly.Instead, this happened:
I expect
dev-dependencies
to be ignored by this lint, because they are in fact used intests/
modules."remove the dependency or add
use version_sync as _;
" help message is also unhelpful, because it will cause unresolved imports forcargo build
and similar commands.Meta
rustc --version --verbose
:Full verbose build log
The text was updated successfully, but these errors were encountered: