Skip to content

Commit

Permalink
Or<T> should be a new type of PhantomData<T> (#8212)
Browse files Browse the repository at this point in the history
# 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.
  • Loading branch information
orzogc committed Mar 26, 2023
1 parent 4f16d6e commit e71078a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/filter.rs
Expand Up @@ -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> {
Expand Down

0 comments on commit e71078a

Please sign in to comment.