forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve documentation for macro-generated label types (bevyengine#5367)
# Objective I noticed while working on bevyengine#5366 that the documentation for label types wasn't working correctly. Having experimented with this for a few weeks, I believe that generating docs in macros is more effort than it's worth. ## Solution Add more boilerplate, copy-paste and edit the docs across types. This also lets us add custom doctests for specific types. Also, we don't need `concat_idents` as a dependency anymore.
- Loading branch information
Showing
4 changed files
with
82 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
pub use bevy_ecs_macros::{AmbiguitySetLabel, RunCriteriaLabel, StageLabel, SystemLabel}; | ||
use bevy_utils::define_label; | ||
|
||
define_label!(StageLabel); | ||
define_label!(SystemLabel); | ||
define_label!(AmbiguitySetLabel); | ||
define_label!(RunCriteriaLabel); | ||
define_label!( | ||
/// A strongly-typed class of labels used to identify [`Stage`](crate::schedule::Stage)s. | ||
StageLabel, | ||
/// Strongly-typed identifier for a [`StageLabel`]. | ||
StageLabelId, | ||
); | ||
define_label!( | ||
/// A strongly-typed class of labels used to identify [`System`](crate::system::System)s. | ||
SystemLabel, | ||
/// Strongly-typed identifier for a [`SystemLabel`]. | ||
SystemLabelId, | ||
); | ||
define_label!( | ||
/// A strongly-typed class of labels used to identify sets of systems with intentionally ambiguous execution order. | ||
AmbiguitySetLabel, | ||
/// Strongly-typed identifier for an [`AmbiguitySetLabel`]. | ||
AmbiguitySetLabelId, | ||
); | ||
define_label!( | ||
/// A strongly-typed class of labels used to identify [run criteria](crate::schedule::RunCriteria). | ||
RunCriteriaLabel, | ||
/// Strongly-typed identifier for a [`RunCriteriaLabel`]. | ||
RunCriteriaLabelId, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters