Fix Entity hygiene in WorldQuery (#6614)

# Objective

Fix #6593

## Solution

Fully qualify `Entity` in the `WorldQuery` macro
This commit is contained in:
Nicola Papale 2022-11-14 14:01:16 +00:00
parent 7231e00507
commit 1967c3ddef

View file

@ -282,7 +282,7 @@ pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream {
#[inline(always)] #[inline(always)]
unsafe fn fetch<'__w>( unsafe fn fetch<'__w>(
_fetch: &mut <Self as #path::query::WorldQuery>::Fetch<'__w>, _fetch: &mut <Self as #path::query::WorldQuery>::Fetch<'__w>,
_entity: Entity, _entity: #path::entity::Entity,
_table_row: usize _table_row: usize
) -> <Self as #path::query::WorldQuery>::Item<'__w> { ) -> <Self as #path::query::WorldQuery>::Item<'__w> {
Self::Item { Self::Item {
@ -295,7 +295,7 @@ pub fn derive_world_query_impl(ast: DeriveInput) -> TokenStream {
#[inline(always)] #[inline(always)]
unsafe fn filter_fetch<'__w>( unsafe fn filter_fetch<'__w>(
_fetch: &mut <Self as #path::query::WorldQuery>::Fetch<'__w>, _fetch: &mut <Self as #path::query::WorldQuery>::Fetch<'__w>,
_entity: Entity, _entity: #path::entity::Entity,
_table_row: usize _table_row: usize
) -> bool { ) -> bool {
true #(&& <#field_types>::filter_fetch(&mut _fetch.#field_idents, _entity, _table_row))* true #(&& <#field_types>::filter_fetch(&mut _fetch.#field_idents, _entity, _table_row))*