Skip to content

Commit 90ded85

Browse files
authored
CI: test docs build with --cfg docsrs (#2191)
Ensures our docs will actually build on docs.rs. After publishing `kdf` I noticed since it's an ancient PR it still had `doc_auto_cfg`. This should reproduce the failure.
1 parent 1ad0231 commit 90ded85

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/workspace.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ jobs:
3939
- uses: actions/checkout@v6
4040
- uses: dtolnay/rust-toolchain@master
4141
with:
42-
toolchain: stable
42+
toolchain: nightly
4343
# TODO(tarcieri): remove `--exclude crypto` after new release series
44-
- run: cargo doc --workspace --all-features --no-deps --exclude crypto
44+
- env:
45+
RUSTDOCFLAGS: "--cfg docsrs"
46+
run: cargo doc --workspace --all-features --no-deps --exclude crypto
4547

4648
rustfmt:
4749
runs-on: ubuntu-latest

kdf/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![no_std]
2-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2+
#![cfg_attr(docsrs, feature(doc_cfg))]
33
#![doc = include_str!("../README.md")]
44
#![doc(
55
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",

0 commit comments

Comments
 (0)