From 01b37d67fc79652507ee28220969b53546de5949 Mon Sep 17 00:00:00 2001 From: papow65 Date: Wed, 9 Oct 2024 00:41:04 +0200 Subject: [PATCH] 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 --- crates/bevy_gizmos/src/lib.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index e5f8e7b086de9..cb3c446a1ad7a 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -83,6 +83,10 @@ use bevy_ecs::{ use bevy_math::Vec3; use bevy_reflect::TypePath; +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] use crate::config::GizmoMeshConfig; #[cfg(feature = "bevy_render")] @@ -600,7 +604,10 @@ impl RenderCommand

for SetLineGizmoBindGroup #[cfg(feature = "bevy_render")] struct DrawLineGizmo; -#[cfg(feature = "bevy_render")] +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] impl RenderCommand

for DrawLineGizmo { type Param = SRes>; type ViewQuery = (); @@ -653,7 +660,10 @@ impl RenderCommand

for DrawLineGizmo { #[cfg(feature = "bevy_render")] struct DrawLineJointGizmo; -#[cfg(feature = "bevy_render")] +#[cfg(all( + feature = "bevy_render", + any(feature = "bevy_pbr", feature = "bevy_sprite") +))] impl RenderCommand

for DrawLineJointGizmo { type Param = SRes>; type ViewQuery = ();