@@ -154,7 +154,7 @@ pub trait ParallelSystemDescriptorCoercion<Params> {
154
154
155
155
/// Specifies that the system is exempt from execution order ambiguity detection
156
156
/// with other systems with the given label.
157
- fn ambiguous_with ( self , label : impl SystemLabel ) -> ParallelSystemDescriptor ;
157
+ fn ambiguous_with < Marker > ( self , label : impl AsSystemLabel < Marker > ) -> ParallelSystemDescriptor ;
158
158
}
159
159
160
160
impl ParallelSystemDescriptorCoercion < ( ) > for ParallelSystemDescriptor {
@@ -186,14 +186,20 @@ impl ParallelSystemDescriptorCoercion<()> for ParallelSystemDescriptor {
186
186
self
187
187
}
188
188
189
- fn ambiguous_with ( mut self , label : impl SystemLabel ) -> ParallelSystemDescriptor {
189
+ fn ambiguous_with < Marker > (
190
+ mut self ,
191
+ label : impl AsSystemLabel < Marker > ,
192
+ ) -> ParallelSystemDescriptor {
193
+ let system_label = label. as_system_label ( ) ;
194
+ let boxed_system_label: Box < dyn SystemLabel > = Box :: new ( system_label) ;
195
+
190
196
match & mut self . ambiguity_detection {
191
197
AmbiguityDetection :: IgnoreWithLabel ( v) => {
192
- v. push ( Box :: new ( label ) ) ;
198
+ v. push ( boxed_system_label ) ;
193
199
}
194
200
_ => {
195
201
self . ambiguity_detection =
196
- AmbiguityDetection :: IgnoreWithLabel ( vec ! [ Box :: new ( label ) ] ) ;
202
+ AmbiguityDetection :: IgnoreWithLabel ( vec ! [ boxed_system_label ] ) ;
197
203
}
198
204
}
199
205
self
@@ -228,7 +234,7 @@ where
228
234
new_parallel_descriptor ( Box :: new ( IntoSystem :: into_system ( self ) ) ) . ignore_all_ambiguities ( )
229
235
}
230
236
231
- fn ambiguous_with ( self , label : impl SystemLabel ) -> ParallelSystemDescriptor {
237
+ fn ambiguous_with < Marker > ( self , label : impl AsSystemLabel < Marker > ) -> ParallelSystemDescriptor {
232
238
new_parallel_descriptor ( Box :: new ( IntoSystem :: into_system ( self ) ) ) . ambiguous_with ( label)
233
239
}
234
240
}
@@ -257,7 +263,7 @@ impl ParallelSystemDescriptorCoercion<()> for BoxedSystem<(), ()> {
257
263
new_parallel_descriptor ( self ) . ignore_all_ambiguities ( )
258
264
}
259
265
260
- fn ambiguous_with ( self , label : impl SystemLabel ) -> ParallelSystemDescriptor {
266
+ fn ambiguous_with < Marker > ( self , label : impl AsSystemLabel < Marker > ) -> ParallelSystemDescriptor {
261
267
new_parallel_descriptor ( self ) . ambiguous_with ( label)
262
268
}
263
269
}
@@ -324,7 +330,8 @@ pub trait ExclusiveSystemDescriptorCoercion {
324
330
325
331
/// Specifies that the system is exempt from execution order ambiguity detection
326
332
/// with other systems with the given label.
327
- fn ambiguous_with ( self , label : impl SystemLabel ) -> ExclusiveSystemDescriptor ;
333
+ fn ambiguous_with < Marker > ( self , label : impl AsSystemLabel < Marker > )
334
+ -> ExclusiveSystemDescriptor ;
328
335
}
329
336
330
337
impl ExclusiveSystemDescriptorCoercion for ExclusiveSystemDescriptor {
@@ -371,14 +378,20 @@ impl ExclusiveSystemDescriptorCoercion for ExclusiveSystemDescriptor {
371
378
self
372
379
}
373
380
374
- fn ambiguous_with ( mut self , label : impl SystemLabel ) -> ExclusiveSystemDescriptor {
381
+ fn ambiguous_with < Marker > (
382
+ mut self ,
383
+ label : impl AsSystemLabel < Marker > ,
384
+ ) -> ExclusiveSystemDescriptor {
385
+ let system_label = label. as_system_label ( ) ;
386
+ let boxed_system_label: Box < dyn SystemLabel > = Box :: new ( system_label) ;
387
+
375
388
match & mut self . ambiguity_detection {
376
389
AmbiguityDetection :: IgnoreWithLabel ( v) => {
377
- v. push ( Box :: new ( label ) ) ;
390
+ v. push ( boxed_system_label ) ;
378
391
}
379
392
_ => {
380
393
self . ambiguity_detection =
381
- AmbiguityDetection :: IgnoreWithLabel ( vec ! [ Box :: new ( label ) ] ) ;
394
+ AmbiguityDetection :: IgnoreWithLabel ( vec ! [ boxed_system_label ] ) ;
382
395
}
383
396
}
384
397
self
@@ -424,7 +437,10 @@ where
424
437
new_exclusive_descriptor ( Box :: new ( self ) ) . silence_ambiguity_checks ( )
425
438
}
426
439
427
- fn ambiguous_with ( self , label : impl SystemLabel ) -> ExclusiveSystemDescriptor {
440
+ fn ambiguous_with < Marker > (
441
+ self ,
442
+ label : impl AsSystemLabel < Marker > ,
443
+ ) -> ExclusiveSystemDescriptor {
428
444
new_exclusive_descriptor ( Box :: new ( self ) ) . ambiguous_with ( label)
429
445
}
430
446
}
0 commit comments