bevy/crates/bevy_ecs/src/query
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
..
access.rs add methods to get reads and writes of Access<T> (#3166) 2021-12-11 23:16:01 +00:00
fetch.rs Fix doc_markdown lints in bevy_ecs (#3473) 2022-01-06 00:43:37 +00:00
filter.rs Implement iter() for mutable Queries (#2305) 2021-12-01 23:28:10 +00:00
iter.rs docs: Fix private doc links and enable CI test (#3743) 2022-02-02 21:47:29 +00:00
mod.rs Implement and require #[derive(Component)] on all component structs (#2254) 2021-10-03 19:23:44 +00:00
state.rs Fix documentation for QueryState::iter_manual (#3644) 2022-01-13 01:50:54 +00:00