@@ -283,7 +283,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
283
283
/// For example, `Query<(&mut A, &B, &mut C), With<D>>` will become `Query<(&A, &B, &C), With<D>>`.
284
284
/// This can be useful when working around the borrow checker,
285
285
/// or reusing functionality between systems via functions that accept query types.
286
- pub fn to_readonly ( & self ) -> Query < ' _ , ' _ , Q :: ReadOnly , F :: ReadOnly > {
286
+ pub fn to_readonly ( & self ) -> Query < ' _ , ' s , Q :: ReadOnly , F :: ReadOnly > {
287
287
let new_state = self . state . as_readonly ( ) ;
288
288
// SAFETY: This is memory safe because it turns the query immutable.
289
289
unsafe {
@@ -372,7 +372,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
372
372
#[ inline]
373
373
pub fn iter_combinations < const K : usize > (
374
374
& self ,
375
- ) -> QueryCombinationIter < ' _ , ' _ , Q :: ReadOnly , F :: ReadOnly , K > {
375
+ ) -> QueryCombinationIter < ' _ , ' s , Q :: ReadOnly , F :: ReadOnly , K > {
376
376
// SAFETY: system runs without conflicts with other systems.
377
377
// same-system queries have runtime borrow checks when they conflict
378
378
unsafe {
@@ -409,7 +409,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
409
409
#[ inline]
410
410
pub fn iter_combinations_mut < const K : usize > (
411
411
& mut self ,
412
- ) -> QueryCombinationIter < ' _ , ' _ , Q , F , K > {
412
+ ) -> QueryCombinationIter < ' _ , ' s , Q , F , K > {
413
413
// SAFETY: system runs without conflicts with other systems.
414
414
// same-system queries have runtime borrow checks when they conflict
415
415
unsafe {
@@ -455,7 +455,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
455
455
pub fn iter_many < EntityList : IntoIterator > (
456
456
& self ,
457
457
entities : EntityList ,
458
- ) -> QueryManyIter < ' _ , ' _ , Q :: ReadOnly , F :: ReadOnly , EntityList :: IntoIter >
458
+ ) -> QueryManyIter < ' _ , ' s , Q :: ReadOnly , F :: ReadOnly , EntityList :: IntoIter >
459
459
where
460
460
EntityList :: Item : Borrow < Entity > ,
461
461
{
@@ -504,7 +504,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
504
504
pub fn iter_many_mut < EntityList : IntoIterator > (
505
505
& mut self ,
506
506
entities : EntityList ,
507
- ) -> QueryManyIter < ' _ , ' _ , Q , F , EntityList :: IntoIter >
507
+ ) -> QueryManyIter < ' _ , ' s , Q , F , EntityList :: IntoIter >
508
508
where
509
509
EntityList :: Item : Borrow < Entity > ,
510
510
{
@@ -527,7 +527,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
527
527
/// This function makes it possible to violate Rust's aliasing guarantees. You must make sure
528
528
/// this call does not result in multiple mutable references to the same component
529
529
#[ inline]
530
- pub unsafe fn iter_unsafe ( & ' s self ) -> QueryIter < ' w , ' s , Q , F > {
530
+ pub unsafe fn iter_unsafe ( & self ) -> QueryIter < ' _ , ' s , Q , F > {
531
531
// SEMI-SAFETY: system runs without conflicts with other systems.
532
532
// same-system queries have runtime borrow checks when they conflict
533
533
self . state
@@ -543,7 +543,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
543
543
#[ inline]
544
544
pub unsafe fn iter_combinations_unsafe < const K : usize > (
545
545
& self ,
546
- ) -> QueryCombinationIter < ' _ , ' _ , Q , F , K > {
546
+ ) -> QueryCombinationIter < ' _ , ' s , Q , F , K > {
547
547
// SEMI-SAFETY: system runs without conflicts with other systems.
548
548
// same-system queries have runtime borrow checks when they conflict
549
549
self . state . iter_combinations_unchecked_manual (
@@ -564,7 +564,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
564
564
pub unsafe fn iter_many_unsafe < EntityList : IntoIterator > (
565
565
& self ,
566
566
entities : EntityList ,
567
- ) -> QueryManyIter < ' _ , ' _ , Q , F , EntityList :: IntoIter >
567
+ ) -> QueryManyIter < ' _ , ' s , Q , F , EntityList :: IntoIter >
568
568
where
569
569
EntityList :: Item : Borrow < Entity > ,
570
570
{
@@ -635,7 +635,7 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
635
635
/// # bevy_ecs::system::assert_is_system(gravity_system);
636
636
/// ```
637
637
#[ inline]
638
- pub fn for_each_mut < ' a , FN : FnMut ( QueryItem < ' a , Q > ) > ( & ' a mut self , f : FN ) {
638
+ pub fn for_each_mut < ' a > ( & ' a mut self , f : impl FnMut ( QueryItem < ' a , Q > ) ) {
639
639
// SAFETY: system runs without conflicts with other systems. same-system queries have runtime
640
640
// borrow checks when they conflict
641
641
unsafe {
@@ -701,10 +701,10 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
701
701
///
702
702
/// [`ComputeTaskPool`]: bevy_tasks::prelude::ComputeTaskPool
703
703
#[ inline]
704
- pub fn par_for_each_mut < ' a , FN : Fn ( QueryItem < ' a , Q > ) + Send + Sync + Clone > (
704
+ pub fn par_for_each_mut < ' a > (
705
705
& ' a mut self ,
706
706
batch_size : usize ,
707
- f : FN ,
707
+ f : impl Fn ( QueryItem < ' a , Q > ) + Send + Sync + Clone ,
708
708
) {
709
709
// SAFETY: system runs without conflicts with other systems. same-system queries have runtime
710
710
// borrow checks when they conflict
@@ -947,9 +947,9 @@ impl<'w, 's, Q: WorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
947
947
/// this call does not result in multiple mutable references to the same component
948
948
#[ inline]
949
949
pub unsafe fn get_unchecked (
950
- & ' s self ,
950
+ & self ,
951
951
entity : Entity ,
952
- ) -> Result < QueryItem < ' w , Q > , QueryEntityError > {
952
+ ) -> Result < QueryItem < ' _ , Q > , QueryEntityError > {
953
953
// SEMI-SAFETY: system runs without conflicts with other systems.
954
954
// same-system queries have runtime borrow checks when they conflict
955
955
self . state
@@ -1374,7 +1374,7 @@ impl<'w, 's, Q: ReadOnlyWorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
1374
1374
/// # bevy_ecs::system::assert_is_system(print_selected_character_name_system);
1375
1375
/// ```
1376
1376
#[ inline]
1377
- pub fn get_inner ( & ' s self , entity : Entity ) -> Result < ROQueryItem < ' w , Q > , QueryEntityError > {
1377
+ pub fn get_inner ( & self , entity : Entity ) -> Result < ROQueryItem < ' w , Q > , QueryEntityError > {
1378
1378
// SAFETY: system runs without conflicts with other systems.
1379
1379
// same-system queries have runtime borrow checks when they conflict
1380
1380
unsafe {
@@ -1411,7 +1411,7 @@ impl<'w, 's, Q: ReadOnlyWorldQuery, F: WorldQuery> Query<'w, 's, Q, F> {
1411
1411
/// # bevy_ecs::system::assert_is_system(report_names_system);
1412
1412
/// ```
1413
1413
#[ inline]
1414
- pub fn iter_inner ( & ' s self ) -> QueryIter < ' w , ' s , Q :: ReadOnly , F :: ReadOnly > {
1414
+ pub fn iter_inner ( & self ) -> QueryIter < ' w , ' s , Q :: ReadOnly , F :: ReadOnly > {
1415
1415
// SAFETY: system runs without conflicts with other systems.
1416
1416
// same-system queries have runtime borrow checks when they conflict
1417
1417
unsafe {
0 commit comments