bevyengine/bevy · error

&World conflicts with a previous mutable system parameter. A

Error message

&World conflicts with a previous mutable system parameter. Allowing this would break Rust's mutability rules

What it means

Panics in the SystemParam::init_access impl for &World: requesting read-only access to the entire World conflicts with a mutable system parameter already declared earlier in the same system's signature, which would violate Rust's aliasing rules.

Source

Thrown at crates/bevy_ecs/src/system/system_param.rs:808

    type State = ();
    type Item<'w, 's> = &'w World;

    fn init_state(_world: &mut World) -> Self::State {}

    fn init_access(
        _state: &Self::State,
        _system_meta: &mut SystemMeta,
        component_access_set: &mut FilteredAccessSet,
        _world: &mut World,
    ) {
        let mut filtered_access = FilteredAccess::default();

        filtered_access.read_all();
        if !component_access_set
            .get_conflicts_single(&filtered_access)
            .is_empty()
        {
            panic!("&World conflicts with a previous mutable system parameter. Allowing this would break Rust's mutability rules");
        }
        component_access_set.add(filtered_access);
    }

    #[inline]
    unsafe fn get_param<'w, 's>(
        _state: &'s mut Self::State,
        _system_meta: &SystemMeta,
        world: UnsafeWorldCell<'w>,
        _change_tick: Tick,
    ) -> Result<Self::Item<'w, 's>, SystemParamValidationError> {
        // SAFETY: Read-only access to the entire world was registered in `init_state`.
        Ok(unsafe { world.world() })
    }
}

// SAFETY: `DeferredWorld` can read all components and resources but cannot be used to gain any other mutable references.
unsafe impl<'w> SystemParam for DeferredWorld<'w> {

View on GitHub (pinned to 396ca72708)

Solutions

  1. Replace &World with narrower parameters such as Res<T>, Local<T>, or Query so access is disjoint
  2. Wrap the conflicting parameters in a ParamSet
  3. Use DeferredWorld or commands instead of direct world access
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/bevy_ecs/src/system/system_param.rs:808 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20). Data as JSON: /api/errors/19e226487f82463c. Report an issue: GitHub.