From 73498a79b137776449d910fa76b0593ecaf1f008 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 5 Oct 2026 06:36:48 +0300 Subject: [PATCH 1/3] ci: build docs with nightly and docsrs cfg --- .github/workflows/docs-preview.yml | 6 ++++-- .github/workflows/lint.yml | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 4691c17..18dfb45 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -22,12 +22,14 @@ jobs: with: persist-credentials: false - - name: Install Rust + - name: Install Rust (nightly) uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 + with: + toolchain: nightly - name: Build documentation env: - RUSTDOCFLAGS: -D warnings + RUSTDOCFLAGS: --cfg=docsrs -D warnings run: cargo doc --workspace --no-deps --all-features - name: Redirect to detrim diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dd57e68..43745bf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -62,14 +62,15 @@ jobs: with: persist-credentials: false - - name: Install Rust + - name: Install Rust (nightly) uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0 with: + toolchain: nightly components: rust-docs - name: Check for broken intra-doc links env: - RUSTDOCFLAGS: -D warnings + RUSTDOCFLAGS: --cfg=docsrs -D warnings run: cargo doc --workspace --no-deps --all-features zizmor: From b5b3d2e2ed253b8922b926068c392d5f9b0f74f1 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 5 Oct 2026 06:33:46 +0300 Subject: [PATCH 2/3] docs: use doc_cfg for nightly documentation --- crates/detrim/src/lib.rs | 2 +- crates/double-int/src/lib.rs | 2 +- crates/serde-bool/src/lib.rs | 2 +- crates/serde-decimal/src/lib.rs | 2 +- crates/serde-secrecy/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/detrim/src/lib.rs b/crates/detrim/src/lib.rs index 9694ddf..c1550a4 100644 --- a/crates/detrim/src/lib.rs +++ b/crates/detrim/src/lib.rs @@ -17,7 +17,7 @@ //! ``` #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] extern crate alloc; diff --git a/crates/double-int/src/lib.rs b/crates/double-int/src/lib.rs index 47035ce..ccf6566 100644 --- a/crates/double-int/src/lib.rs +++ b/crates/double-int/src/lib.rs @@ -34,7 +34,7 @@ #![no_std] #![deny(rust_2018_idioms, nonstandard_style, future_incompatible)] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use serde_core::{de, Deserialize, Deserializer, Serialize, Serializer}; diff --git a/crates/serde-bool/src/lib.rs b/crates/serde-bool/src/lib.rs index c7ebc85..ca8f4e0 100644 --- a/crates/serde-bool/src/lib.rs +++ b/crates/serde-bool/src/lib.rs @@ -59,7 +59,7 @@ //! ``` #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use serde::{Deserialize, Deserializer, Serialize, Serializer}; diff --git a/crates/serde-decimal/src/lib.rs b/crates/serde-decimal/src/lib.rs index 8930a9b..d6a427f 100644 --- a/crates/serde-decimal/src/lib.rs +++ b/crates/serde-decimal/src/lib.rs @@ -23,7 +23,7 @@ //! * use `nullable_arbitrary_precision` for `Option` where the field is required but may //! be null. -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod double_option_float; pub mod non_required_float; diff --git a/crates/serde-secrecy/src/lib.rs b/crates/serde-secrecy/src/lib.rs index 9adf381..f34f6ad 100644 --- a/crates/serde-secrecy/src/lib.rs +++ b/crates/serde-secrecy/src/lib.rs @@ -1,6 +1,6 @@ //! Serde support for [`secrecy`] types. -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] use secrecy::{ExposeSecret as _, SecretString}; use serde_core::Serializer; From 434e334571bc001c83b7dbb2ded1926f0cb54223 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 5 Oct 2026 06:42:19 +0300 Subject: [PATCH 3/3] ci: name jobs --- .github/workflows/ci.yml | 3 ++- .github/workflows/coverage.yml | 3 ++- .github/workflows/docs-preview.yml | 6 ++++-- .github/workflows/lint.yml | 12 ++++++++---- .github/workflows/release.yml | 3 ++- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9add8cf..ef4022e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,8 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 828c60f..190d851 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,8 @@ jobs: coverage: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false - name: Install Rust diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml index 18dfb45..28235d7 100644 --- a/.github/workflows/docs-preview.yml +++ b/.github/workflows/docs-preview.yml @@ -18,7 +18,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false @@ -63,7 +64,8 @@ jobs: pull-requests: write steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: main persist-credentials: false diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 43745bf..153f9c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,8 @@ jobs: checks: write steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false @@ -43,7 +44,8 @@ jobs: rustfmt: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false @@ -58,7 +60,8 @@ jobs: docs: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false @@ -82,7 +85,8 @@ jobs: contents: read steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: persist-credentials: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9640bcc..8376d87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,8 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - - uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 + - name: Checkout + uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1.8.1 with: fetch-depth: 0 persist-credentials: true