diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-06-02 14:16:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 14:16:52 -0700 |
commit | 4e26ae3cb93d6f22edef9d4fa1221e94b7abded2 (patch) | |
tree | dcd8daa4455567347827b0d5965830df48fc6dab | |
parent | 22bea37cfc739139ed53a6da06d52249e7b12961 (diff) | |
download | ruby-4e26ae3cb93d6f22edef9d4fa1221e94b7abded2.tar.gz |
YJIT: Use #[cfg] instead of if cfg! (#7899)
-rw-r--r-- | yjit/src/stats.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs index 444514b909..00197effe6 100644 --- a/yjit/src/stats.rs +++ b/yjit/src/stats.rs @@ -641,7 +641,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()) }; |