backport to 0.15: remove reliance on a trait solver bug (#19360)

A backport of https://github.com/bevyengine/bevy/pull/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
https://github.com/bevyengine/bevy/pull/15184 which is from version
0.15. So this is the only version which needs a backport.

cc @mockersf
This commit is contained in:
lcnr 2025-05-25 16:26:14 +02:00 committed by GitHub
parent 75f04a743b
commit aaa01c0787
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -269,6 +269,7 @@ macro_rules! impl_exclusive_system_function {
// is a function, potentially because of the multiple impls of `FnMut`
#[allow(clippy::too_many_arguments)]
fn call_inner<In: SystemInput, Out, $($param,)*>(
_: PhantomData<In>,
mut f: impl FnMut(In::Param<'_>, &mut World, $($param,)*) -> Out,
input: In::Inner<'_>,
world: &mut World,
@ -277,7 +278,7 @@ macro_rules! impl_exclusive_system_function {
f(In::wrap(input), world, $($param,)*)
}
let ($($param,)*) = param_value;
call_inner(self, input, world, $($param),*)
call_inner(PhantomData::<In>, self, input, world, $($param),*)
}
}
};

View File

@ -1023,6 +1023,7 @@ macro_rules! impl_system_function {
fn run(&mut self, input: In::Inner<'_>, param_value: SystemParamItem< ($($param,)*)>) -> Out {
#[allow(clippy::too_many_arguments)]
fn call_inner<In: SystemInput, Out, $($param,)*>(
_: PhantomData<In>,
mut f: impl FnMut(In::Param<'_>, $($param,)*)->Out,
input: In::Inner<'_>,
$($param: $param,)*
@ -1030,7 +1031,7 @@ macro_rules! impl_system_function {
f(In::wrap(input), $($param,)*)
}
let ($($param,)*) = param_value;
call_inner(self, input, $($param),*)
call_inner(PhantomData::<In>, self, input, $($param),*)
}
}
};