From d4cb6a2b29fd87d5c8f624cf9f3be60c5e4c2b9b Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Mon, 29 Sep 2025 15:44:32 -0700 Subject: [PATCH 1/3] Update all nightly toolchains to latest nightly Signed-off-by: Joe Richey --- .github/workflows/build.yml | 4 ++-- .github/workflows/nopanic.yaml | 2 +- .github/workflows/tests.yml | 4 ++-- .github/workflows/workspace.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a84ca684..2d65f582 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -156,7 +156,7 @@ jobs: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 components: rust-src - env: RUSTFLAGS: -Dwarnings --cfg getrandom_backend="linux_raw" @@ -190,7 +190,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: targets: ${{ matrix.target.target }} - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 components: rust-src - uses: Swatinem/rust-cache@v2 - name: Build diff --git a/.github/workflows/nopanic.yaml b/.github/workflows/nopanic.yaml index c4907c10..5903c2e2 100644 --- a/.github/workflows/nopanic.yaml +++ b/.github/workflows/nopanic.yaml @@ -140,7 +140,7 @@ jobs: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 components: rust-src - run: cargo build --release - run: cargo build --release --target=x86_64-win7-windows-msvc -Zbuild-std="std,panic_abort" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4fc5c880..dc8f19ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,7 +133,7 @@ jobs: # Win7 targets are Tier3, so pin a nightly where libstd builds. - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 components: rust-src - uses: Swatinem/rust-cache@v2 - run: cargo test --target=x86_64-win7-windows-msvc -Z build-std --features=std @@ -155,7 +155,7 @@ jobs: - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 components: rust-src - name: default configuration env: diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 857578fd..99b0cbaa 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -23,7 +23,7 @@ jobs: # Fixed Nigthly version is used to prevent # CI failures which are not relevant to PR changes # on introduction of new Clippy lints. - toolchain: nightly-2025-09-15 + toolchain: nightly-2025-09-28 components: clippy,rust-src - name: std feature run: cargo clippy --features std @@ -110,7 +110,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: # We need Nightly for doc_auto_cfg - toolchain: nightly-2025-06-01 + toolchain: nightly-2025-09-28 - uses: Swatinem/rust-cache@v2 - name: Generate Docs env: From c904801e8bdac1f2b1903f80edeb07a0d4a81b20 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Mon, 29 Sep 2025 15:37:40 -0700 Subject: [PATCH 2/3] Change removed doc_auto_cfg feature The `doc_auto_cfg` feature was removed in a recent nightly. We can just switch to `doc_cfg`, and everything still works like before. Signed-off-by: Joe Richey --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8ffd4c98..adb7e5b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ )] #![doc = include_str!("../README.md")] #![warn(rust_2018_idioms, unused_lifetimes, missing_docs)] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(getrandom_backend = "efi_rng", feature(uefi_std))] #![deny( clippy::cast_lossless, From 18d89843981b93032b2a2c6f1e33897075a8d727 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Mon, 29 Sep 2025 17:50:34 -0700 Subject: [PATCH 3/3] Don't run doctests with -Zsanitizer=memory Signed-off-by: Joe Richey --- .github/workflows/tests.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dc8f19ca..df5f0ec0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -157,42 +157,37 @@ jobs: with: toolchain: nightly-2025-09-28 components: rust-src + # Use --all-targets to skip doctests, which don't work with the -Zsanitizer=memory flag. + # See: https://github.com/rust-lang/rust/issues/134172 - name: default configuration env: RUSTFLAGS: -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - name: --cfg getrandom_backend="linux_getrandom" env: RUSTFLAGS: --cfg getrandom_backend="linux_getrandom" -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_backend="linux_getrandom" -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - name: --cfg getrandom_backend="linux_raw" env: RUSTFLAGS: --cfg getrandom_backend="linux_raw" -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_backend="linux_raw" -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - name: --cfg getrandom_backend="linux_fallback" env: RUSTFLAGS: --cfg getrandom_backend="linux_fallback" -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_backend="linux_fallback" -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - if: ${{ matrix.arch == 'x86_64' }} name: --cfg getrandom_backend="rdrand" env: RUSTFLAGS: --cfg getrandom_backend="rdrand" -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_backend="rdrand" -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - name: --cfg getrandom_test_linux_fallback env: RUSTFLAGS: --cfg getrandom_test_linux_fallback -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_test_linux_fallback -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu - name: --cfg getrandom_test_linux_without_fallback env: RUSTFLAGS: --cfg getrandom_test_linux_without_fallback -Dwarnings -Zsanitizer=memory - RUSTDOCFLAGS: --cfg getrandom_test_linux_without_fallback -Dwarnings -Zsanitizer=memory - run: cargo test -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu + run: cargo test --all-targets -Zbuild-std --target=${{ matrix.arch }}-unknown-linux-gnu cross: name: Cross