use std::marker::PhantomData;
use bevy_ecs::prelude::*;
fn main() {
assert_eq!(UnitLabel.as_label(), UnitLabel.as_label());
assert_eq!(EnumLabel::One.as_label(), EnumLabel::One.as_label());
assert_ne!(EnumLabel::One.as_label(), EnumLabel::Two.as_label());
assert_eq!(WeirdLabel(1).as_label(), WeirdLabel(2).as_label());
assert_ne!(
GenericLabel::<f64>::One.as_label(),
GenericLabel::<char>::One.as_label(),
);
}
#[derive(SystemLabel)]
pub struct UnitLabel;
#[derive(SystemLabel)]
pub enum EnumLabel {
One,
Two,
}
#[derive(SystemLabel)]
#[system_label(ignore_fields)]
pub struct WeirdLabel(i32);
#[derive(SystemLabel)]
pub enum GenericLabel<T> {
One,
#[system_label(ignore_fields)]
Two(PhantomData<T>),
}