From 1d794dbb3700be20cad1eb5a02ea46b7b6c1632e Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 30 Jan 2024 14:37:29 -0500 Subject: [PATCH] Only `impl Global` for `DebugBelow` when compiling with `debug_assertions` (#7102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes this error when compiling a release build: Screenshot 2024-01-30 at 2 30 38 PM `DebugBelow` only exists when compiling with `debug_assertions`, so we only want to implement it using that same criterion. Release Notes: - N/A --- crates/gpui/src/style.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/style.rs b/crates/gpui/src/style.rs index d5209bd5bd07ff811a6c902f5dc29db1c1b5a36f..ef2622e3eb61e61d35780d895d2a1ebc5d85057b 100644 --- a/crates/gpui/src/style.rs +++ b/crates/gpui/src/style.rs @@ -14,12 +14,13 @@ pub use taffy::style::{ Overflow, Position, }; -#[cfg(debug_assertions)] /// Use this struct for interfacing with the 'debug_below' styling from your own elements. /// If a parent element has this style set on it, then this struct will be set as a global in /// GPUI. +#[cfg(debug_assertions)] pub struct DebugBelow; +#[cfg(debug_assertions)] impl Global for DebugBelow {} /// The CSS styling that can be applied to an element via the `Styled` trait