You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust-toolchain.toml omits rustfmt, so a fresh checkout cannot run the fmt gate and CI works around it twice #726
clippy is there. rustfmt is not — even though cargo fmt --check is a
required CI gate exactly like clippy. On a machine that has never installed
rustfmt for this nightly, cargo fmt fails, and nothing in the toolchain file
says why.
CI compensates for the gap rather than closing it, in two separate workflows:
.github/workflows/fmt.yml:24 — with a comment naming the cause directly:
"rust-toolchain.toml pins nightly-2026-04-03 but does not list rustfmt as a
component. Add it explicitly so cargo fmt resolves against the same
nightly the rest of CI uses."
.github/workflows/unit-tests.yml:183 — the generated-intrinsics job needs
it too, because cuda-intrinsics-gen shells out to rustfmt when it writes
generated sources.
So the workaround has already had to be copied once. A third job needing rustfmt
would need it again.
This also bites outside CI: provisioning a fresh build machine from the repo
gives you a toolchain that cannot run just fmt-check, which is a confusing
first experience given the file exists precisely to make the toolchain
reproducible.
Suggested fix
Add rustfmt to the component list and drop the two workaround steps, making
the toolchain file the single source of truth for both required formatting and
linting components.
Activity
build: pin rustfmt in rust-toolchain.toml like clippy (NVIDIA#727)