From e9bcdb1d69c2259c57b2c833479fbb6371ab81ce Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 28 Sep 2026 10:41:10 +0200 Subject: [PATCH] Pin compatible nightly rustfmt Nightly rustfmt from September 23 rewrites code that stable rustfmt changes back, causing the weekly formatting PR to fail CI. Pin the last compatible nightly to keep weekly formatting usable. Co-Authored-By: HAL 9000 --- .github/workflows/cron-weekly-rustfmt.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cron-weekly-rustfmt.yml b/.github/workflows/cron-weekly-rustfmt.yml index 3d709fe71e..944d57cb61 100644 --- a/.github/workflows/cron-weekly-rustfmt.yml +++ b/.github/workflows/cron-weekly-rustfmt.yml @@ -15,12 +15,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: dtolnay/rust-toolchain@nightly + # Nightly 2026-09-23 and later reformat code that stable rustfmt reverts + # (see #1118). Keep the last nightly compatible with stable CI checks. + - uses: dtolnay/rust-toolchain@master with: + toolchain: nightly-2026-09-22 components: rustfmt - name: Run Nightly rustfmt # Run the formatter and manually remove trailing whitespace. - run: cargo +nightly fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//' + run: cargo +nightly-2026-09-22 fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//' - name: Get the current date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Create Pull Request