Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: Use #[cfg] instead of if cfg! #7893

Merged
merged 1 commit into from Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion yjit/src/stats.rs
Expand Up @@ -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()) };

Expand Down