Enable rust-2024-compatibility lint rules #248
Draft
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.
Changelog
None
Docs
None
Description
Enables lint rules to ease migration to the 2024 edition if/when we ever choose to do so.
I also ran
cargo fix --edition
which automatically rewrote some code to ensure its semantics don't change with the new edition (due to this if let temporary scope change).The only remaining errors were from
tail_expr_drop_order
(explainer). I suspect a lot of them won't actually cause problems for us, butcargo fix --edition
can't rewrite to avoid them, and I wasn't able to disable the rule on a case-by-case basis using#[allow()]
, so I just disabled it globally.