ci: declare rustfmt/clippy components in rust-toolchain.toml

The 1.98.1 pin installs without rustfmt and clippy, so the fmt and
clippy jobs fail at the shim before running. Listing the components in
the toolchain file makes rustup auto-install them on every host,
including the CI runners that invoke cargo with no setup action.
This commit is contained in:
2026-09-10 09:28:50 +08:00
parent f862633512
commit 4f59e25652
+4
View File
@@ -1,3 +1,7 @@
[toolchain] [toolchain]
channel = "1.98.1" channel = "1.98.1"
# CI invokes rustfmt/clippy through the rustup shim with no setup action, so
# the pinned toolchain must declare its components here — the runner images
# only preinstall them for their default toolchain.
components = ["rustfmt", "clippy"]
targets = ["x86_64-pc-windows-msvc", "wasm32-unknown-unknown"] targets = ["x86_64-pc-windows-msvc", "wasm32-unknown-unknown"]