Skip to content

Commit e8828fa

Browse files
committed
Add track caller everywhere
1 parent b81851a commit e8828fa

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

crates/bevy_ecs/src/schedule_v3/config.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,12 @@ where
120120
SystemSetConfig::new(Box::new(self))
121121
}
122122

123+
#[track_caller]
123124
fn in_set(self, set: impl SystemSet) -> SystemSetConfig {
124125
self.into_config().in_set(set)
125126
}
126127

128+
#[track_caller]
127129
fn in_base_set(self, set: impl SystemSet) -> SystemSetConfig {
128130
self.into_config().in_base_set(set)
129131
}
@@ -162,10 +164,12 @@ impl IntoSystemSetConfig for BoxedSystemSet {
162164
SystemSetConfig::new(self)
163165
}
164166

167+
#[track_caller]
165168
fn in_set(self, set: impl SystemSet) -> SystemSetConfig {
166169
self.into_config().in_set(set)
167170
}
168171

172+
#[track_caller]
169173
fn in_base_set(self, set: impl SystemSet) -> SystemSetConfig {
170174
self.into_config().in_base_set(set)
171175
}
@@ -204,6 +208,7 @@ impl IntoSystemSetConfig for SystemSetConfig {
204208
self
205209
}
206210

211+
#[track_caller]
207212
fn in_set(mut self, set: impl SystemSet) -> Self {
208213
assert!(
209214
!set.is_system_type(),
@@ -221,6 +226,7 @@ impl IntoSystemSetConfig for SystemSetConfig {
221226
self
222227
}
223228

229+
#[track_caller]
224230
fn in_base_set(mut self, set: impl SystemSet) -> Self {
225231
assert!(
226232
!set.is_system_type(),
@@ -322,10 +328,12 @@ where
322328
SystemConfig::new(Box::new(IntoSystem::into_system(self)))
323329
}
324330

331+
#[track_caller]
325332
fn in_set(self, set: impl SystemSet) -> SystemConfig {
326333
self.into_config().in_set(set)
327334
}
328335

336+
#[track_caller]
329337
fn in_base_set(self, set: impl SystemSet) -> SystemConfig {
330338
self.into_config().in_base_set(set)
331339
}
@@ -364,10 +372,12 @@ impl IntoSystemConfig<()> for BoxedSystem<(), ()> {
364372
SystemConfig::new(self)
365373
}
366374

375+
#[track_caller]
367376
fn in_set(self, set: impl SystemSet) -> SystemConfig {
368377
self.into_config().in_set(set)
369378
}
370379

380+
#[track_caller]
371381
fn in_base_set(self, set: impl SystemSet) -> SystemConfig {
372382
self.into_config().in_base_set(set)
373383
}
@@ -406,6 +416,7 @@ impl IntoSystemConfig<()> for SystemConfig {
406416
self
407417
}
408418

419+
#[track_caller]
409420
fn in_set(mut self, set: impl SystemSet) -> Self {
410421
assert!(
411422
!set.is_system_type(),
@@ -419,6 +430,7 @@ impl IntoSystemConfig<()> for SystemConfig {
419430
self
420431
}
421432

433+
#[track_caller]
422434
fn in_base_set(mut self, set: impl SystemSet) -> Self {
423435
assert!(
424436
!set.is_system_type(),
@@ -516,11 +528,13 @@ where
516528
fn into_configs(self) -> SystemConfigs;
517529

518530
/// Add these systems to the provided `set`.
531+
#[track_caller]
519532
fn in_set(self, set: impl SystemSet) -> SystemConfigs {
520533
self.into_configs().in_set(set)
521534
}
522535

523536
/// Add these systems to the provided "base" `set`.
537+
#[track_caller]
524538
fn in_base_set(self, set: impl SystemSet) -> SystemConfigs {
525539
self.into_configs().in_base_set(set)
526540
}
@@ -565,6 +579,7 @@ impl IntoSystemConfigs<()> for SystemConfigs {
565579
self
566580
}
567581

582+
#[track_caller]
568583
fn in_set(mut self, set: impl SystemSet) -> Self {
569584
assert!(
570585
!set.is_system_type(),
@@ -581,6 +596,7 @@ impl IntoSystemConfigs<()> for SystemConfigs {
581596
self
582597
}
583598

599+
#[track_caller]
584600
fn in_base_set(mut self, set: impl SystemSet) -> Self {
585601
assert!(
586602
!set.is_system_type(),
@@ -665,11 +681,13 @@ where
665681
fn into_configs(self) -> SystemSetConfigs;
666682

667683
/// Add these system sets to the provided `set`.
684+
#[track_caller]
668685
fn in_set(self, set: impl SystemSet) -> SystemSetConfigs {
669686
self.into_configs().in_set(set)
670687
}
671688

672689
/// Add these system sets to the provided "base" `set`.
690+
#[track_caller]
673691
fn in_base_set(self, set: impl SystemSet) -> SystemSetConfigs {
674692
self.into_configs().in_base_set(set)
675693
}
@@ -709,6 +727,7 @@ impl IntoSystemSetConfigs for SystemSetConfigs {
709727
self
710728
}
711729

730+
#[track_caller]
712731
fn in_set(mut self, set: impl SystemSet) -> Self {
713732
assert!(
714733
!set.is_system_type(),
@@ -729,6 +748,7 @@ impl IntoSystemSetConfigs for SystemSetConfigs {
729748
self
730749
}
731750

751+
#[track_caller]
732752
fn in_base_set(mut self, set: impl SystemSet) -> Self {
733753
assert!(
734754
!set.is_system_type(),

crates/bevy_ecs/src/schedule_v3/graph_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ impl GraphInfo {
105105
}
106106
}
107107

108+
#[track_caller]
108109
pub(crate) fn set_base_set(&mut self, set: BoxedSystemSet) {
109110
if let Some(current) = &self.base_set {
110111
panic!(

0 commit comments

Comments
 (0)