Fix warnings for rust 1.87

This commit is contained in:
Noa authored and Jeong, YunWon committed 2025-05-16 18:52:14 +09:00
1 parent 72dc4954ad
commit 2c02e2776b
3 files changed
+9 -4

No files matched your search

+1 -2
View File
@@ -1165,8 +1165,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
// ----- Merge: Return the final result.
self.builder.switch_to_block(merge_block);
let final_val = self.builder.block_params(merge_block)[0];
final_val
self.builder.block_params(merge_block)[0]
}
fn compile_ipow(&mut self, a: Value, b: Value) -> Value {
+7 -1
View File
@@ -15,7 +15,13 @@ pub enum JitCompileError {
#[error("bad bytecode")]
BadBytecode,
#[error("error while compiling to machine code: {0}")]
CraneliftError(#[from] ModuleError),
CraneliftError(Box<ModuleError>),
}
impl From<ModuleError> for JitCompileError {
fn from(err: ModuleError) -> Self {
Self::CraneliftError(Box::new(err))
}
}
#[derive(Debug, thiserror::Error, Eq, PartialEq)]
+1 -1
View File
@@ -78,7 +78,7 @@ impl StackMachine {
pub fn run(&mut self, code: CodeObject) {
let mut oparg_state = OpArgState::default();
code.instructions.iter().try_for_each(|&word| {
let _ = code.instructions.iter().try_for_each(|&word| {
let (instruction, arg) = oparg_state.get(word);
self.process_instruction(instruction, arg, &code.constants, &code.names)
});