From 71f1a0f15f7089bce1ea17cdc129e8d021398bef Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 11 Dec 2024 16:45:23 -0500 Subject: [PATCH] YJIT: Fix unread field lint in release builds ``` warning: fields `blue_begin` and `blue_end` are never read ``` --- yjit/src/disasm.rs | 1 + yjit/src/options.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit/src/disasm.rs b/yjit/src/disasm.rs index a505973331c548..4f85937ee9f0b7 100644 --- a/yjit/src/disasm.rs +++ b/yjit/src/disasm.rs @@ -7,6 +7,7 @@ use crate::options::DumpDisasm; use std::fmt::Write; +#[cfg_attr(not(feature = "disasm"), allow(dead_code))] #[derive(Copy, Clone, Debug)] pub struct TerminalColor { pub blue_begin: &'static str, diff --git a/yjit/src/options.rs b/yjit/src/options.rs index 3fcc40711c3064..9f7c70536966a8 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -152,7 +152,6 @@ pub enum DumpDisasm { // Dump to stdout Stdout, // Dump to "yjit_{pid}.log" file under the specified directory - #[cfg_attr(not(feature = "disasm"), allow(dead_code))] File(std::os::unix::io::RawFd), }