Skip to content

Commit e71078a

Browse files
authored
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.
1 parent 4f16d6e commit e71078a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ecs/src/query/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ unsafe impl<T: Component> ReadOnlyWorldQuery for Without<T> {}
237237
/// }
238238
/// # bevy_ecs::system::assert_is_system(print_cool_entity_system);
239239
/// ```
240-
pub struct Or<T>(pub T);
240+
pub struct Or<T>(PhantomData<T>);
241241

242242
#[doc(hidden)]
243243
pub struct OrFetch<'w, T: WorldQuery> {

0 commit comments

Comments
 (0)