Following the reproduction here, this code:
use bevy::prelude::*;
#[derive(Component)]
struct A;
#[derive(Component)]
struct B;
// The user needs to include both &A and &B in the first type parameter of Query
fn missing_brackets_in_query_system(query: Query<&A, &B>) {}
fn main() {
App::new()
.add_system(missing_brackets_in_query_system)
.run()
}
Produces the following error:
type mismatch resolving `for<'w, 's> <ReadFetch<B> as Fetch<'w, 's>>::Item == bool`
required because of the requirements on the impl of `FilterFetch` for `ReadFetch<B>`
In this case, the user should be grouping &A, &B into the first type argument of Query using our all_tuples-impl'ed macro.
The compiler however sees that &B is used in the place of the query filter, and complains that it's an invalid query due to missing internal traits.
Obviously, implementing FilterFetch or ReadFetch for B is not the approach the user should be taking to solve this problem!
Following the reproduction here, this code:
Produces the following error:
In this case, the user should be grouping
&A, &Binto the first type argument ofQueryusing ourall_tuples-impl'ed macro.The compiler however sees that
&Bis used in the place of the query filter, and complains that it's an invalid query due to missing internal traits.Obviously, implementing
FilterFetchorReadFetchforBis not the approach the user should be taking to solve this problem!