Skip to content

Commit aaa01c0

Browse files
authored
backport to 0.15: remove reliance on a trait solver bug (#19360)
A backport of #18840 to version 0.15.3. I was unsure whether I should also update the versions of all crates. Looking at previous backports this was not done. The code which relies on the old solver behavior was introduced in #15184 which is from version 0.15. So this is the only version which needs a backport. cc @mockersf
1 parent 75f04a7 commit aaa01c0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/bevy_ecs/src/system/exclusive_function_system.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ macro_rules! impl_exclusive_system_function {
269269
// is a function, potentially because of the multiple impls of `FnMut`
270270
#[allow(clippy::too_many_arguments)]
271271
fn call_inner<In: SystemInput, Out, $($param,)*>(
272+
_: PhantomData<In>,
272273
mut f: impl FnMut(In::Param<'_>, &mut World, $($param,)*) -> Out,
273274
input: In::Inner<'_>,
274275
world: &mut World,
@@ -277,7 +278,7 @@ macro_rules! impl_exclusive_system_function {
277278
f(In::wrap(input), world, $($param,)*)
278279
}
279280
let ($($param,)*) = param_value;
280-
call_inner(self, input, world, $($param),*)
281+
call_inner(PhantomData::<In>, self, input, world, $($param),*)
281282
}
282283
}
283284
};

crates/bevy_ecs/src/system/function_system.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,14 +1023,15 @@ macro_rules! impl_system_function {
10231023
fn run(&mut self, input: In::Inner<'_>, param_value: SystemParamItem< ($($param,)*)>) -> Out {
10241024
#[allow(clippy::too_many_arguments)]
10251025
fn call_inner<In: SystemInput, Out, $($param,)*>(
1026+
_: PhantomData<In>,
10261027
mut f: impl FnMut(In::Param<'_>, $($param,)*)->Out,
10271028
input: In::Inner<'_>,
10281029
$($param: $param,)*
10291030
)->Out{
10301031
f(In::wrap(input), $($param,)*)
10311032
}
10321033
let ($($param,)*) = param_value;
1033-
call_inner(self, input, $($param),*)
1034+
call_inner(PhantomData::<In>, self, input, $($param),*)
10341035
}
10351036
}
10361037
};

0 commit comments

Comments
 (0)