What problem does this solve or what need does it fill?
World::resource_scope is very useful for complex access patterns in exclusive systems.
However, it doesn't work with queries.
What solution would you like?
Add `fn query_scope(|q: Query<Q: WorldQuery, F: WorldQuery + FilterFetch>, world: &mut World |{}).
This temporarily removes all matching entities from the World, splitting the borrow.
What alternative(s) have you considered?
Use #4090 or SystemState instead. This won't cover all use cases: there are some things that can only be done with a &mut World.
Expand WorldCell to support queries, per #1555. This is substantially more error prone and slower, as the borrow-checking is done at runtime instead.
What problem does this solve or what need does it fill?
World::resource_scopeis very useful for complex access patterns in exclusive systems.However, it doesn't work with queries.
What solution would you like?
Add `fn query_scope(|q: Query<Q: WorldQuery, F: WorldQuery + FilterFetch>, world: &mut World |{}).
This temporarily removes all matching entities from the
World, splitting the borrow.What alternative(s) have you considered?
Use #4090 or
SystemStateinstead. This won't cover all use cases: there are some things that can only be done with a&mut World.Expand
WorldCellto support queries, per #1555. This is substantially more error prone and slower, as the borrow-checking is done at runtime instead.