bevy/.github
KDecay 506642744c docs: Fix private doc links and enable CI test (#3743)
# Objective

Fixes #3566

## Solution

- [x] Fix broken links in private docs.
- [x] Add the `--document-private-items` flag to the CI.

## Note

The following was said by @killercup in #3566:

> I don't have time to confirm this but I assume that linking to private items throws an error/warning when just running cargo doc, and --document-private-item might actually hide that warning. So to test this, you'd have to run it twice.

I tested this and this is thankfully not the case. If you are linking to a private item you will get a warning no matter if you run `cargo doc` or `cargo doc --document-private-items`.

### Example

I added `struct Test;` to `bevy_core/src/name.rs` and linked to it inside of a doc comment using ``[`Test`]``. After that I ran `cargo doc -p bevy_core --document-private-items` using `RUSTDOCFLAGS="-D warnings"` and got the following output (note the last sentence):

```rust
error: public documentation for `Name` links to private item `Test`
  --> crates/bevy_core/src/name.rs:11:82
   |
11 | /// Component used to identify an entity. Stores a hash for faster comparisons [`Test`]
   |                                                                                  ^^^^ this item is private
   |
   = note: `-D rustdoc::private-intra-doc-links` implied by `-D warnings`
   = note: this link resolves only because you passed `--document-private-items`, but will break without
```
2022-02-02 21:47:29 +00:00
..
contributing Added API guidelines to CONTRIBUTING.md (#3646) 2022-01-16 02:40:25 +00:00
example-run CI: use lavapipe instead of swiftshader when running examples (#3358) 2021-12-17 23:58:09 +00:00
ISSUE_TEMPLATE new labels: feature request 2021-07-13 13:29:05 -07:00
linters Ignore reddit when checking markdown links (#3223) 2021-11-29 20:55:12 +00:00
workflows docs: Fix private doc links and enable CI test (#3743) 2022-02-02 21:47:29 +00:00
bors.toml Re-enable nightly checks and add new dependency duplicate (#3525) 2022-01-02 20:18:53 +00:00
dependabot.yml dependabot: use new C-Dependencies label 2021-07-13 12:51:48 -07:00
FUNDING.yml Create FUNDING.yml 2020-08-18 10:59:30 -07:00
label-config.yml Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
pull_request_template.md Add PR Template (#2272) 2021-06-02 21:07:56 +00:00