Skip to content

Commit a4209ae

Browse files
committed
remove derives in macros
1 parent a728624 commit a4209ae

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

crates/bevy_ecs/src/schedule/label.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ macro_rules! stage_label {
3333
$(
3434
/// A macro-generated local `StageLabel`.
3535
#[allow(non_camel_case_types)]
36-
#[derive($crate::schedule::StageLabel)]
3736
struct $name;
37+
38+
impl $crate::schedule::StageLabel for $name {
39+
fn as_str(&self) -> &'static str {
40+
std::stringify!($name)
41+
}
42+
}
3843
)*
3944
}
4045
}
@@ -46,8 +51,13 @@ macro_rules! system_label {
4651
$(
4752
/// A macro-generated local `SystemLabel`.
4853
#[allow(non_camel_case_types)]
49-
#[derive($crate::schedule::SystemLabel)]
5054
struct $name;
55+
56+
impl $crate::schedule::SystemLabel for $name {
57+
fn as_str(&self) -> &'static str {
58+
std::stringify!($name)
59+
}
60+
}
5161
)*
5262
}
5363
}
@@ -59,8 +69,13 @@ macro_rules! ambiguity_set_label {
5969
$(
6070
/// A macro-generated local `AmbiguitySetLabel`.
6171
#[allow(non_camel_case_types)]
62-
#[derive($crate::schedule::AmbiguitySetLabel)]
6372
struct $name;
73+
74+
impl $crate::schedule::AmbiguitySetLabel for $name {
75+
fn as_str(&self) -> &'static str {
76+
std::stringify!($name)
77+
}
78+
}
6479
)*
6580
}
6681
}
@@ -72,8 +87,13 @@ macro_rules! run_criteria_label {
7287
$(
7388
/// A macro-generated local `RunCriteria`.
7489
#[allow(non_camel_case_types)]
75-
#[derive($crate::schedule::RunCriteriaLabel)]
7690
struct $name;
91+
92+
impl $crate::schedule::RunCriteriaLabel for $name {
93+
fn as_str(&self) -> &'static str {
94+
std::stringify!($name)
95+
}
96+
}
7797
)*
7898
}
7999
}

0 commit comments

Comments
 (0)