From e71078af4919346b1dd3b0b66eeb8b1c18fb6a7e Mon Sep 17 00:00:00 2001 From: orzogc Date: Sun, 26 Mar 2023 09:38:16 +0800 Subject: [PATCH] `Or` should be a new type of `PhantomData` (#8212) # Objective `Or` should be a new type of `PhantomData` instead of `T`. ## Solution Make `Or` a new type of `PhantomData`. ## Migration Guide `Or` is just used as a type annotation and shouldn't be constructed. --- crates/bevy_ecs/src/query/filter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/query/filter.rs b/crates/bevy_ecs/src/query/filter.rs index 41f2a7941b..0072f16666 100644 --- a/crates/bevy_ecs/src/query/filter.rs +++ b/crates/bevy_ecs/src/query/filter.rs @@ -237,7 +237,7 @@ unsafe impl ReadOnlyWorldQuery for Without {} /// } /// # bevy_ecs::system::assert_is_system(print_cool_entity_system); /// ``` -pub struct Or(pub T); +pub struct Or(PhantomData); #[doc(hidden)] pub struct OrFetch<'w, T: WorldQuery> {