[ci] #3622: Use cargo manifest lints instead of unmaintained cargo-lints #3904
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR: use
cargo clippy -Zlints --workspace --benches --tests --examples --all-features
instead ofcargo lints
. Also you can permanently enable the-Zlints
for your IDE by putting the following into.cargo/config.toml
:Description
Since the implementation of rust-lang/rfcs#3389, it is now possible to specify workspace-level lints for rustc and clippy. This PR updates the cargo configuration and CI to use this new feature instead of cargo-lints.
Note that it was only stabilized in
nightly-2023-09-10
. Using it with out current toolchain requires either a -Zlints flag or a modification to.cargo/config.toml
:Also note that unlike the original suggestion in #3622, this doesn't make the lints crate-level, but merely replaces a clunky unmaintained tool with a standard solution for configuring lints.
In particular, this PR:
cargo lints clippy
invocations withcargo clippy -Zlints
in CI scriptscargo lints
and workspacesChecklist