Skip to content

Commit

Permalink
Sync flags in docs.yml with package.metadata.docs.rs (bevyengine#14734
Browse files Browse the repository at this point in the history
)

# Objective

This PR is a follow-up to bevyengine#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 😆)
  • Loading branch information
bash authored Aug 14, 2024
1 parent 3d460e9 commit a346515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
- name: Build docs
env:
# needs to be in sync with [package.metadata.docs.rs]
RUSTFLAGS: --cfg docsrs_dep
RUSTDOCFLAGS: -Zunstable-options --cfg=docsrs --generate-link-to-definition
run: |
cargo doc \
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3368,7 +3368,7 @@ panic = "abort"
# impls for re-exported traits. See https://github.com/rust-lang/cargo/issues/8811
# for details on why this is needed. Since dependencies don't expect to be built
# with `--cfg docsrs` (and thus fail to compile) we use a different cfg.
rustc-args = ["--cfg docsrs_dep"]
rustc-args = ["--cfg", "docsrs_dep"]
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
all-features = true
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
Expand Down

0 comments on commit a346515

Please sign in to comment.