Skip to content

Commit a346515

Browse files
authored
Sync flags in docs.yml with package.metadata.docs.rs (#14734)
# Objective This PR is a follow-up to #14703. I forgot to also add the flags from `package.metadata.docs.rs` to the docs build. ## Solution As [discussed on Discord](https://discord.com/channels/691052431525675048/1272629407659589663/1272643734260940940), I added the missing flags to `docs.yml`. I also updated `rustc-args` to properly make use of the array (I think the value has to be either a space-separated string *or* an array of strings but not an array of space-separated strings 😆)
1 parent 3d460e9 commit a346515

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
- name: Build docs
5959
env:
6060
# needs to be in sync with [package.metadata.docs.rs]
61+
RUSTFLAGS: --cfg docsrs_dep
6162
RUSTDOCFLAGS: -Zunstable-options --cfg=docsrs --generate-link-to-definition
6263
run: |
6364
cargo doc \

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3368,7 +3368,7 @@ panic = "abort"
33683368
# impls for re-exported traits. See https://github.com/rust-lang/cargo/issues/8811
33693369
# for details on why this is needed. Since dependencies don't expect to be built
33703370
# with `--cfg docsrs` (and thus fail to compile) we use a different cfg.
3371-
rustc-args = ["--cfg docsrs_dep"]
3371+
rustc-args = ["--cfg", "docsrs_dep"]
33723372
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
33733373
all-features = true
33743374
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

0 commit comments

Comments
 (0)