Fix failing cargo check with only the bevy_dev_tools feature (#15743)

# Objective
Fixes #15741

## Solution

- Copied the feature gates of a type to where the type is used.

## Testing

- `cargo check` works now using only the bevy_dev_tools feature
This commit is contained in:
papow65 2024-10-09 00:41:04 +02:00 committed by GitHub
parent 26813d9732
commit 01b37d67fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,6 +83,10 @@ use bevy_ecs::{
use bevy_math::Vec3; use bevy_math::Vec3;
use bevy_reflect::TypePath; use bevy_reflect::TypePath;
#[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
use crate::config::GizmoMeshConfig; use crate::config::GizmoMeshConfig;
#[cfg(feature = "bevy_render")] #[cfg(feature = "bevy_render")]
@ -600,7 +604,10 @@ impl<const I: usize, P: PhaseItem> RenderCommand<P> for SetLineGizmoBindGroup<I>
#[cfg(feature = "bevy_render")] #[cfg(feature = "bevy_render")]
struct DrawLineGizmo; struct DrawLineGizmo;
#[cfg(feature = "bevy_render")] #[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
impl<P: PhaseItem> RenderCommand<P> for DrawLineGizmo { impl<P: PhaseItem> RenderCommand<P> for DrawLineGizmo {
type Param = SRes<RenderAssets<GpuLineGizmo>>; type Param = SRes<RenderAssets<GpuLineGizmo>>;
type ViewQuery = (); type ViewQuery = ();
@ -653,7 +660,10 @@ impl<P: PhaseItem> RenderCommand<P> for DrawLineGizmo {
#[cfg(feature = "bevy_render")] #[cfg(feature = "bevy_render")]
struct DrawLineJointGizmo; struct DrawLineJointGizmo;
#[cfg(feature = "bevy_render")] #[cfg(all(
feature = "bevy_render",
any(feature = "bevy_pbr", feature = "bevy_sprite")
))]
impl<P: PhaseItem> RenderCommand<P> for DrawLineJointGizmo { impl<P: PhaseItem> RenderCommand<P> for DrawLineJointGizmo {
type Param = SRes<RenderAssets<GpuLineGizmo>>; type Param = SRes<RenderAssets<GpuLineGizmo>>;
type ViewQuery = (); type ViewQuery = ();