Skip to content

Document define_label! sufficiently that it can be used.#24444

Open
kpreid wants to merge 2 commits into
bevyengine:mainfrom
kpreid:define-label
Open

Document define_label! sufficiently that it can be used.#24444
kpreid wants to merge 2 commits into
bevyengine:mainfrom
kpreid:define-label

Conversation

@kpreid
Copy link
Copy Markdown
Contributor

@kpreid kpreid commented May 25, 2026

Objective

Fixes #22834.

Solution

  • Add more explanation of what define_label! does
  • Add example implementations
  • Change the existing extra_methods_impl example to forward the call

This PR will conflict with #24445. I will rebase whichever one doesn’t get merged first.

Testing

  • Ran doctests
  • Reviewed rendered documentation

Comment thread crates/bevy_ecs/src/label.rs Outdated
@kfc35 kfc35 added C-Docs An addition or correction to our documentation A-App Bevy apps and plugins S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 25, 2026
Co-authored-by: Chris Biscardi <chris@christopherbiscardi.com>
/// }
///
/// assert_eq!(MyLabel.intern(), MyLabel.intern());
/// assert_eq!(MyLabel.intern(), MyLabel.intern());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate line

Suggested change
/// assert_eq!(MyLabel.intern(), MyLabel.intern());

@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-App Bevy apps and plugins C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ecs::define_label! usage documentation is incomplete

3 participants