Skip to content

Commit 4c7f66a

Browse files
committed
break the ICE
1 parent 110b13b commit 4c7f66a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/bevy_ecs/src/system/query.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ where
285285
/// Runs `f` on each query result. This is faster than the equivalent iter() method, but cannot
286286
/// be chained like a normal [`Iterator`].
287287
#[inline]
288-
pub fn for_each_mut(&mut self, f: impl FnMut(<Q::Fetch as Fetch<'_, '_>>::Item)) {
288+
pub fn for_each_mut<'a>(&'a mut self, f: impl FnMut(<Q::Fetch as Fetch<'a, 'a>>::Item)) {
289289
// SAFE: system runs without conflicts with other systems. same-system queries have runtime
290290
// borrow checks when they conflict
291291
unsafe {
@@ -327,11 +327,11 @@ where
327327

328328
/// Runs `f` on each query result in parallel using the given task pool.
329329
#[inline]
330-
pub fn par_for_each_mut(
331-
&mut self,
330+
pub fn par_for_each_mut<'a>(
331+
&'a mut self,
332332
task_pool: &TaskPool,
333333
batch_size: usize,
334-
f: impl Fn(<Q::Fetch as Fetch<'_, '_>>::Item) + Send + Sync + Clone,
334+
f: impl Fn(<Q::Fetch as Fetch<'a, 'a>>::Item) + Send + Sync + Clone,
335335
) {
336336
// SAFE: system runs without conflicts with other systems. same-system queries have runtime
337337
// borrow checks when they conflict

0 commit comments

Comments
 (0)