From 215694854d0cf49d01b1a6a73c37ca6b9da504ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Fri, 10 May 2024 14:02:44 +0300 Subject: [PATCH 1/3] Tweak docs CI job --- .github/workflows/test.yml | 22 +++++++++++++++------- rand_core/src/impls.rs | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de886e48fb..f6892738e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,17 +12,25 @@ permissions: jobs: check-doc: name: Check doc + env: + RUSDOCTFLAGS: "-Dwarnings --cfg docsrs -Zunstable-options --generate-link-to-definition" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly - - run: cargo install cargo-deadlinks - - name: doc (rand) - env: - RUSTDOCFLAGS: --cfg doc_cfg - # --all builds all crates, but with default features for other crates (okay in this case) - run: cargo deadlinks --ignore-fragments -- --all --features nightly,serde1,getrandom,small_rng + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + - name: rand + run: cargo doc --all-features --no-deps + - name: rand_core + run: cargo doc --all-features --package rand_core --no-deps + - name: rand_distr + run: cargo doc --all-features --package rand_distr --no-deps + - name: rand_chacha + run: cargo doc --all-features --package rand_chacha --no-deps + - name: rand_pcg + run: cargo doc --all-features --package rand_pcg --no-deps test: runs-on: ${{ matrix.os }} diff --git a/rand_core/src/impls.rs b/rand_core/src/impls.rs index 34230e1582..5e3fd50c6e 100644 --- a/rand_core/src/impls.rs +++ b/rand_core/src/impls.rs @@ -160,7 +160,7 @@ pub fn next_u64_via_fill(rng: &mut R) -> u64 { u64::from_le_bytes(buf) } -/// Implement [`TryRngCore`][crate::TryRngCore] for a type implementing [`RngCore`]. +/// Implement [`TryRngCore`] for a type implementing [`RngCore`]. /// /// Ideally, `rand_core` would define blanket impls for this, but they conflict with blanket impls /// for `&mut R` and `Box`, so until specialziation is stabilized, implementer crates From b8a70fb20e4f8438bce3aa3c87a9c0c3dba90355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Fri, 10 May 2024 14:09:47 +0300 Subject: [PATCH 2/3] Fix typo --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6892738e1..c8d1892554 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ permissions: jobs: check-doc: name: Check doc - env: - RUSDOCTFLAGS: "-Dwarnings --cfg docsrs -Zunstable-options --generate-link-to-definition" runs-on: ubuntu-latest + env: + RUSTDOCFLAGS: "-Dwarnings --cfg docsrs -Zunstable-options --generate-link-to-definition" steps: - uses: actions/checkout@v4 - name: Install toolchain From 9c246b39817d882e56a32b7af97fd59991c52c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Fri, 10 May 2024 14:10:27 +0300 Subject: [PATCH 3/3] Fix intentionally introduced doc mistake --- rand_core/src/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rand_core/src/impls.rs b/rand_core/src/impls.rs index 5e3fd50c6e..34230e1582 100644 --- a/rand_core/src/impls.rs +++ b/rand_core/src/impls.rs @@ -160,7 +160,7 @@ pub fn next_u64_via_fill(rng: &mut R) -> u64 { u64::from_le_bytes(buf) } -/// Implement [`TryRngCore`] for a type implementing [`RngCore`]. +/// Implement [`TryRngCore`][crate::TryRngCore] for a type implementing [`RngCore`]. /// /// Ideally, `rand_core` would define blanket impls for this, but they conflict with blanket impls /// for `&mut R` and `Box`, so until specialziation is stabilized, implementer crates