YJIT: Use #[cfg] instead of if cfg! (#7899)

This commit is contained in:
Takashi Kokubun 2023-06-02 14:16:52 -07:00 committed by GitHub
parent 22bea37cfc
commit 4e26ae3cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-06-02 21:17:21 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View File

@ -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()) };