diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-06-01 20:47:29 -0700 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2023-06-02 16:30:00 +0900 |
| commit | ae70d2d7866174c19f67a1ab4f52625476ca6173 (patch) | |
| tree | 597d05b1bba2c508b73a44d9de9f1851036170f2 | |
| parent | 08bf3bcfb722aff2eb66782c0aec59a145fee185 (diff) | |
YJIT: Use #[cfg] instead of if cfg!
| -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 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()) }; |
