Skip to content

Commit 14a1425

Browse files
committed
Fix warnings for rust 1.87
1 parent b696e56 commit 14a1425

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

jit/src/instructions.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,8 +1165,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
11651165

11661166
// ----- Merge: Return the final result.
11671167
self.builder.switch_to_block(merge_block);
1168-
let final_val = self.builder.block_params(merge_block)[0];
1169-
final_val
1168+
self.builder.block_params(merge_block)[0]
11701169
}
11711170

11721171
fn compile_ipow(&mut self, a: Value, b: Value) -> Value {

jit/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ pub enum JitCompileError {
1515
#[error("bad bytecode")]
1616
BadBytecode,
1717
#[error("error while compiling to machine code: {0}")]
18-
CraneliftError(#[from] ModuleError),
18+
CraneliftError(Box<ModuleError>),
19+
}
20+
21+
impl From<ModuleError> for JitCompileError {
22+
fn from(err: ModuleError) -> Self {
23+
Self::CraneliftError(Box::new(err))
24+
}
1925
}
2026

2127
#[derive(Debug, thiserror::Error, Eq, PartialEq)]

0 commit comments

Comments
 (0)