From ae70d2d7866174c19f67a1ab4f52625476ca6173 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 1 Jun 2023 20:47:29 -0700 Subject: [PATCH] YJIT: Use #[cfg] instead of if cfg! --- yjit/src/stats.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 91e4ec078f..177b612eaf 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -493,7 +493,8 @@ pub extern "C" fn rb_yjit_record_exit_stack(exit_pc: *const VALUE) // rb_vm_insn_addr2opcode won't work in cargo test --all-features // because it's a C function. Without insn call, this function is useless // so wrap the whole thing in a not test check. - if cfg!(not(test)) { + #[cfg(not(test))] + { // Get the opcode from the encoded insn handler at this PC let insn = unsafe { rb_vm_insn_addr2opcode((*exit_pc).as_ptr()) };