Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The compiler complains that the WorldQuery trait isn't implemented when using the WithBundle<> filter #2616

Closed
TheSylex opened this issue Aug 7, 2021 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior S-Duplicate This issue or PR already exists

Comments

@TheSylex
Copy link

TheSylex commented Aug 7, 2021

Bevy version

Release 0.5.0

Operating system & version

Windows 11

What you did

Simply create a function with a query that uses the WithBundle<> filter, for example:

pub fn example_withbundle_error(
    mut example_query: Query<Entity, WithBundle<SpriteBundle>>
) {

}

What you expected to happen

The compiler shouldn't complain for using the WithBundle<> filter

What actually happened

The compiler complains that I cannot use the filter because the WorldQuery trait isn't implemented:

the trait bound WithBundle<bevy::prelude::SpriteBundle>: WorldQuery is not satisfied
the trait WorldQuery is not implemented for WithBundle<bevy::prelude::SpriteBundle> (rustc E0277)

@TheSylex TheSylex added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Aug 7, 2021
@DJMcNab
Copy link
Member

DJMcNab commented Aug 7, 2021

Duplicate of #2023

@DJMcNab DJMcNab added A-ECS Entities, components, systems, and events S-Duplicate This issue or PR already exists and removed S-Needs-Triage This issue needs to be labelled labels Aug 7, 2021
@DJMcNab DJMcNab closed this as completed Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior S-Duplicate This issue or PR already exists
Projects
None yet
Development

No branches or pull requests

2 participants