Skip to content

Commit 44eef06

Browse files
ci/docs: Patch generic-array/getrandom/winnow for now
The docs will continue to fail till serde-rs/serde#2998 is resolved
1 parent 82cabbf commit 44eef06

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

.github/workflows/docs.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,36 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v5
20-
- uses: dtolnay/rust-toolchain@nightly
20+
- uses: dtolnay/rust-toolchain
2121
with:
22-
toolchain: nightly-2025-09-28
22+
toolchain: nightly
23+
24+
- name: Fetch dependencies and patch generic-array
25+
run: |
26+
# Fetch dependencies first to download the crates
27+
cargo fetch
28+
29+
# Now patch crates that use doc_auto_cfg
30+
# Patch generic-array crate
31+
find ~/.cargo/registry/src -name "lib.rs" -path "*/generic-array-*/src/lib.rs" -exec \
32+
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
33+
34+
# Patch getrandom crate
35+
find ~/.cargo/registry/src -name "lib.rs" -path "*/getrandom-*/src/lib.rs" -exec \
36+
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
37+
38+
# Patch winnow crate (remove doc_auto_cfg line entirely since it already has doc_cfg)
39+
find ~/.cargo/registry/src -name "lib.rs" -path "*/winnow-*/src/lib.rs" -exec \
40+
sed -i '/doc_auto_cfg/d' {} \; || true
41+
42+
# Patch toml_datetime crate
43+
find ~/.cargo/registry/src -name "lib.rs" -path "*/toml_datetime-*/src/lib.rs" -exec \
44+
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
45+
46+
# Patch toml_edit crate
47+
find ~/.cargo/registry/src -name "lib.rs" -path "*/toml_edit-*/src/lib.rs" -exec \
48+
sed -i 's/doc_auto_cfg/doc_cfg/g' {} \; || true
49+
2350
- env:
2451
RUSTFLAGS: --cfg docsrs
2552
RUSTDOCFLAGS: --cfg docsrs

0 commit comments

Comments
 (0)