diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index f6db10ba5ad75..514c21b69354d 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -167,7 +167,7 @@ impl_query_set!(); /// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist. /// /// Use `Option>` instead if the resource might not always exist. -pub struct Res<'w, T> { +pub struct Res<'w, T: Component> { value: &'w T, ticks: &'w ComponentTicks, last_change_tick: u32, @@ -311,7 +311,7 @@ impl<'a, T: Component> SystemParamFetch<'a> for OptionResState { /// Panics when used as a [`SystemParameter`](SystemParam) if the resource does not exist. /// /// Use `Option>` instead if the resource might not always exist. -pub struct ResMut<'w, T> { +pub struct ResMut<'w, T: Component> { value: &'w mut T, ticks: &'w mut ComponentTicks, last_change_tick: u32,