Or<T> should be a new type of PhantomData<T> (#8212)

# Objective

`Or<T>` should be a new type of `PhantomData<T>` instead of `T`.

## Solution

Make `Or<T>` a new type of `PhantomData<T>`.

## Migration Guide

`Or<T>` is just used as a type annotation and shouldn't be constructed.
This commit is contained in:
orzogc 2023-03-26 09:38:16 +08:00 committed by GitHub
parent 4f16d6e0dc
commit e71078af49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,7 +237,7 @@ unsafe impl<T: Component> ReadOnlyWorldQuery for Without<T> {}
/// }
/// # bevy_ecs::system::assert_is_system(print_cool_entity_system);
/// ```
pub struct Or<T>(pub T);
pub struct Or<T>(PhantomData<T>);
#[doc(hidden)]
pub struct OrFetch<'w, T: WorldQuery> {