mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fixes remaining issues and turns back on dead code and unused (#6584)
This commit is contained in:
parent
6bd72a6406
commit
12c30f215c
Notes:
git
2022-10-18 20:04:21 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2 changed files with 2 additions and 5 deletions
|
@ -530,9 +530,9 @@ fn get_or_create_iseq_payload(iseq: IseqPtr) -> &'static mut IseqPayload {
|
|||
/// Iterate over all existing ISEQs
|
||||
pub fn for_each_iseq<F: FnMut(IseqPtr)>(mut callback: F) {
|
||||
unsafe extern "C" fn callback_wrapper(iseq: IseqPtr, data: *mut c_void) {
|
||||
let callback: &mut &mut dyn FnMut(IseqPtr) -> bool = unsafe { std::mem::transmute(data) };
|
||||
let callback: &mut &mut dyn FnMut(IseqPtr) -> bool = std::mem::transmute(&mut *data);
|
||||
callback(iseq);
|
||||
};
|
||||
}
|
||||
let mut data: &mut dyn FnMut(IseqPtr) = &mut callback;
|
||||
unsafe { rb_yjit_for_each_iseq(Some(callback_wrapper), (&mut data) as *mut _ as *mut c_void) };
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
#![allow(clippy::too_many_arguments)] // :shrug:
|
||||
#![allow(clippy::identity_op)] // Sometimes we do it for style
|
||||
|
||||
// Temporary while switching to the new backend
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused)]
|
||||
|
||||
mod asm;
|
||||
mod backend;
|
||||
|
|
Loading…
Reference in a new issue