Upgrade the Rust Toolchain
bevy_lint matches nightly Rust versions with clippy_utils. A new version of clippy_utils is released with each version of Rust, which bevy_lint should keep up to date with.
-
Go to
clippy_utils’s page on crates.io and find the nightly toolchain it requires. For example:This crate is only guaranteed to build with this nightly toolchain:
nightly-2025-01-09 -
Change the
channelfield inrust-toolchain.tomlto the version specified byclippy_utils. -
Replace the toolchain version for the latest
-devversion in the compatibility table.- Don’t replace the toolchain version in other parts of the docs, as they should use the latest stable toolchain and not the latest development toolchain.
-
Increase the version of
clippy_utilsinCargo.tomlto the latest version.
Once you’ve finished upgrading the Rust toolchain and clippy_utils, there are a few extra steps that can verify bevy_lint still functions the same.
-
Read over the release notes for potentially breaking changes.
-
Skim through diff.rs for
clippy_utilsto see if anything the linter uses may have changed.clippy_utilsdoesn’t provide a user-facing changelog, unfortunately. You may find the Git history useful, though!
-
Verify you’ve installed the latest pinned Rust toolchain. If you use Rustup, it should be automatically installed the first time you run
rustcorcargoin the workspace.rustc --version -
Test that the linter still compiles and passes all tests.
cargo clean cargo build cargo test -
After opening the pull request, verify that the
linter-action.ymlworkflow passes in CI.