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
channel
field inrust-toolchain.toml
to the version specified byclippy_utils
. -
Update the compatibility table for the latest
-dev
version. -
Increase the version of
clippy_utils
inCargo.toml
to the latest version. -
Change the two occurrences of the toolchain in
action.yml
to the new 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_utils
to see if anything the linter uses may have changed.clippy_utils
doesn'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
rustc
orcargo
in 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.yml
workflow passes in CI.