diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index 7a16c48519..ff9420cd52 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -1470,7 +1470,7 @@ unsafe impl SystemParam for Deferred<'_, T> { } /// A dummy type that is [`!Send`](Send), to force systems to run on the main thread. -pub struct NonSendMarker; +pub struct NonSendMarker(PhantomData<*mut ()>); // SAFETY: No world access. unsafe impl SystemParam for NonSendMarker { @@ -1489,7 +1489,7 @@ unsafe impl SystemParam for NonSendMarker { _world: UnsafeWorldCell<'world>, _change_tick: Tick, ) -> Self::Item<'world, 'state> { - Self + Self(PhantomData) } }