From d95f236dca9624044a342a2b00607f99253badf7 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 20 Nov 2025 16:46:28 -0500 Subject: [PATCH 1/3] Privatise docsrs cfg flag Fixes a docs.rs build failure by following the same approach used in rustls, removing `doc_auto_cfg` and privatizing the docsrs cfg flag. ``` [INFO] [stderr] Documenting instant-acme v0.8.3 (/opt/rustwide/workdir) [INFO] [stderr] error[E0557]: feature has been removed [INFO] [stderr] --> src/lib.rs:5:38 [INFO] [stderr] | [INFO] [stderr] 5 | #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] [INFO] [stderr] | ^^^^^^^^^^^^ feature has been removed [INFO] [stderr] | [INFO] [stderr] = note: removed in CURRENT_RUSTC_VERSION; see for more information [INFO] [stderr] = note: merged into `doc_cfg` [INFO] [stderr] [INFO] [stderr] error: Compilation failed, aborting rustdoc ``` --- Cargo.toml | 5 ++++- src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a1e454f..b35c9c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,7 +68,7 @@ required-features = ["hyper-rustls"] [package.metadata.docs.rs] # all non-default features except fips (cannot build on docs.rs environment) features = ["aws-lc-rs", "x509-parser", "time"] -rustdoc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "instant_acme_docsrs"] [package.metadata.cargo_check_external_types] allowed_external_types = [ @@ -80,3 +80,6 @@ allowed_external_types = [ "serde::*", "serde_json::*", ] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ["cfg(instant_acme_docsrs)"] } diff --git a/src/lib.rs b/src/lib.rs index ce9daf9..6e8676a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ #![warn(unreachable_pub)] #![warn(missing_docs)] -#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] +#![cfg_attr(instant_acme_docsrs, feature(doc_cfg))] use std::convert::Infallible; use std::error::Error as StdError; From 820f3690eb48bb6e4fea3c9aa3c723a3d9a157c7 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 20 Nov 2025 16:52:33 -0500 Subject: [PATCH 2/3] ci: check docs w/ doc_cfg enabled This in turn requires using nightly. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7503164..b7b89af 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -73,10 +73,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@nightly - run: cargo doc --locked --all-features --no-deps --document-private-items env: - RUSTDOCFLAGS: -Dwarnings + RUSTDOCFLAGS: -Dwarnings --cfg=instant_acme_docsrs semver: name: Check semver compatibility From 9202eba79be3efb144dcc04ecb3f237bc58955d8 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 20 Nov 2025 17:12:24 -0500 Subject: [PATCH 3/3] Cargo: version 0.8.3 -> 0.8.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 208ec60..3b0d959 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -701,7 +701,7 @@ dependencies = [ [[package]] name = "instant-acme" -version = "0.8.3" +version = "0.8.4" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index b35c9c6..bda1c42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "instant-acme" -version = "0.8.3" +version = "0.8.4" edition = "2021" rust-version = "1.70" license = "Apache-2.0"