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:
parent
4f16d6e0dc
commit
e71078af49
@ -237,7 +237,7 @@ unsafe impl<T: Component> ReadOnlyWorldQuery for Without<T> {}
|
|||||||
/// }
|
/// }
|
||||||
/// # bevy_ecs::system::assert_is_system(print_cool_entity_system);
|
/// # bevy_ecs::system::assert_is_system(print_cool_entity_system);
|
||||||
/// ```
|
/// ```
|
||||||
pub struct Or<T>(pub T);
|
pub struct Or<T>(PhantomData<T>);
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct OrFetch<'w, T: WorldQuery> {
|
pub struct OrFetch<'w, T: WorldQuery> {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user