Avoid unnecessary warnings with older Clippy versions #359
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.
In 80e0101, I first added a rule for a new Clippy lint (introduced in 1.73.0) to fix our optional CI check that lints with the beta toolchain. This would break the required CI check against the MSRV so I decided to allow unknown lints for that check in ef29d94. However, this isn't ideal as it only applies to the CI checks and still shows the warnings when developing or rather linting locally.
Luckily we can use the rustversion crate to make the Clippy lint overrides via attributes also depend on the Rust/toolchain version (this especially helps with cases like in 0556536 where the override is only required for a single toolchain version).
It's just a bit unfortunate that I cannot use
stable(1.77)
since that really only applies to stable versions and1.77
is currently still a beta version (so I have to combineall
,since
, andbefore
to produce aversion(1.77)
).