bevy/crates/bevy_ecs/macros/src
SpecificProtagonist d92fc1e456
Move required components doc to type doc (#16575)
# Objective

Make documentation of a component's required components more visible by
moving it to the type's docs

## Solution

Change `#[require]` from a derive macro helper to an attribute macro.

Disadvantages:
- this silences any unused code warnings on the component, as it is used
by the macro!
- need to import `require` if not using the ecs prelude (I have not
included this in the migration guilde as Rust tooling already suggests
the fix)

---

## Showcase
![Documentation of
Camera](https://github.com/user-attachments/assets/3329511b-747a-4c8d-a43e-57f7c9c71a3c)

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2024-12-03 19:45:20 +00:00
..
component.rs Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
lib.rs Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
query_data.rs bevy_ecs: Replace panics in QueryData derive compile errors (#15691) 2024-10-07 16:30:34 +00:00
query_filter.rs Make QueryFilter an unsafe trait (#14790) 2024-09-09 15:23:12 +00:00
states.rs Computed State & Sub States (#11426) 2024-05-02 19:36:23 +00:00
world_query.rs Allow to expect (adopted) (#15301) 2024-09-20 19:16:42 +00:00