diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19c60de8..16098abc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - name: cargo doc (all features) run: cargo doc --all --all-features --document-private-items env: - RUSTDOCFLAGS: '-Dwarnings' + RUSTDOCFLAGS: ${{ matrix.rust_channel == 'nightly' && '-Dwarnings --cfg=docsrs' || '-Dwarnings' }} build-windows: runs-on: windows-latest diff --git a/src/lib.rs b/src/lib.rs index f3970836..76a3e22a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,6 +29,7 @@ println!("{}", cert.serialize_private_key_pem()); #![forbid(non_ascii_idents)] #![deny(missing_docs)] #![allow(clippy::complexity, clippy::style, clippy::pedantic)] +#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "pem")] use pem::Pem;