Skip to content

Commit

Permalink
don't add docs_dep flag where not needed in base version
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecificProtagonist committed Feb 9, 2025
1 parent 8ba2c82 commit 5631e4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4066,8 +4066,6 @@ rustc-args = ["--cfg", "docsrs_dep"]
rustdoc-args = [
"-Zunstable-options",
"--generate-link-to-definition",
"--cfg",
"docsrs_dep",
# Embed tags to the top of documentation pages for common Bevy traits
# that are implemented by the current type, like `Component` or `Resource`.
# This makes it easier to see at a glance what types are used for.
Expand Down
11 changes: 2 additions & 9 deletions docs-rs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,15 @@ then add the following to your Cargo.toml:

```toml
[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs_dep"]
rustdoc-args = [
"--cfg", "docsrs_dep",
"--html-after-content", "docs-rs/trait-tags.html",
]

[lints.rust]
unexpected_cfgs = { check-cfg = ['cfg(docsrs_dep)'] }
rustdoc-args = ["--html-after-content", "docs-rs/trait-tags.html"]
```

## Local Testing

Build the documentation with the extension enabled like this:

```bash
RUSTDOCFLAGS="--html-after-content docs-rs/trait-tags.html --cfg docsrs_dep" RUSTFLAGS="--cfg docsrs_dep" cargo doc --no-deps --package <package_name>
RUSTDOCFLAGS="--html-after-content docs-rs/trait-tags.html" cargo doc --no-deps --package <package_name>
```

[rustdoc]: https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html
Expand Down

0 comments on commit 5631e4a

Please sign in to comment.