@@ -9,7 +9,7 @@ use crate::{
99 check_system_change_tick, ReadOnlySystemParamFetch , System , SystemParam , SystemParamFetch ,
1010 SystemParamItem , SystemParamState ,
1111 } ,
12- world:: { World , WorldId } ,
12+ world:: { interior_mutable_world :: InteriorMutableWorld , World , WorldId } ,
1313} ;
1414use bevy_ecs_macros:: all_tuples;
1515use std:: { borrow:: Cow , fmt:: Debug , marker:: PhantomData } ;
@@ -169,7 +169,7 @@ impl<Param: SystemParam> SystemState<Param> {
169169 {
170170 self . validate_world_and_update_archetypes ( world) ;
171171 // SAFETY: Param is read-only and doesn't allow mutable access to World. It also matches the World this SystemState was created with.
172- unsafe { self . get_unchecked_manual ( world) }
172+ unsafe { self . get_unchecked_manual ( world. as_interior_mutable_readonly ( ) ) }
173173 }
174174
175175 /// Retrieve the mutable [`SystemParam`] values.
@@ -180,7 +180,7 @@ impl<Param: SystemParam> SystemState<Param> {
180180 ) -> <Param :: Fetch as SystemParamFetch < ' w , ' s > >:: Item {
181181 self . validate_world_and_update_archetypes ( world) ;
182182 // SAFETY: World is uniquely borrowed and matches the World this SystemState was created with.
183- unsafe { self . get_unchecked_manual ( world) }
183+ unsafe { self . get_unchecked_manual ( world. as_interior_mutable ( ) ) }
184184 }
185185
186186 /// Applies all state queued up for [`SystemParam`] values. For example, this will apply commands queued up
@@ -220,7 +220,7 @@ impl<Param: SystemParam> SystemState<Param> {
220220 #[ inline]
221221 pub unsafe fn get_unchecked_manual < ' w , ' s > (
222222 & ' s mut self ,
223- world : & ' w World ,
223+ world : InteriorMutableWorld < ' w > ,
224224 ) -> <Param :: Fetch as SystemParamFetch < ' w , ' s > >:: Item {
225225 let change_tick = world. increment_change_tick ( ) ;
226226 let param = <Param :: Fetch as SystemParamFetch >:: get_param (
@@ -393,7 +393,7 @@ where
393393 }
394394
395395 #[ inline]
396- unsafe fn run_unsafe ( & mut self , input : Self :: In , world : & World ) -> Self :: Out {
396+ unsafe fn run_unsafe ( & mut self , input : Self :: In , world : InteriorMutableWorld < ' _ > ) -> Self :: Out {
397397 let change_tick = world. increment_change_tick ( ) ;
398398
399399 // Safety:
0 commit comments