8000 Fix warnings for rust 1.87 · RustPython/RustPython@2c02e27 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c02e27

Browse files
coolreader18youknowone
authored andcommitted
Fix warnings for rust 1.87
1 parent 72dc495 commit 2c02e27

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
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)]

jit/tests/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl StackMachine {
7878

7979
pub fn run(&mut self, code: CodeObject) {
8080
let mut oparg_state = OpArgState::default();
81-
code.instructions.iter().try_for_each(|&word| {
81+
let _ = code.instructions.iter().try_for_each(|&word| {
8282
let (instruction, arg) = oparg_state.get(word);
8383
self.process_instruction(instruction, arg, &code.constants, &code.names)
8484
});

0 commit comments

Comments
 (0)
0