Skip to content

Commit 7300b3d

Browse files
authored
ZJIT: Fix Rust compilation warning (ruby#14443)
This fixes: ``` warning: unused import: `ParseError` --> zjit/src/codegen.rs:20:61 | 20 | use crate::hir::{Const, FrameState, Function, Insn, InsnId, ParseError}; | ^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default ```
1 parent 856db87 commit 7300b3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zjit/src/codegen.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::stats::{counter_ptr, with_time_stat, Counter, Counter::{compile_time_
1717
use crate::{asm::CodeBlock, cruby::*, options::debug, virtualmem::CodePtr};
1818
use crate::backend::lir::{self, asm_comment, asm_ccall, Assembler, Opnd, Target, CFP, C_ARG_OPNDS, C_RET_OPND, EC, NATIVE_STACK_PTR, NATIVE_BASE_PTR, SCRATCH_OPND, SP};
1919
use crate::hir::{iseq_to_hir, Block, BlockId, BranchEdge, Invariant, RangeType, SideExitReason, SideExitReason::*, SpecialObjectType, SpecialBackrefSymbol, SELF_PARAM_IDX};
20-
use crate::hir::{Const, FrameState, Function, Insn, InsnId, ParseError};
20+
use crate::hir::{Const, FrameState, Function, Insn, InsnId};
2121
use crate::hir_type::{types, Type};
2222
use crate::options::get_option;
2323

@@ -1531,6 +1531,7 @@ fn compile_iseq(iseq: IseqPtr) -> Result<Function, CompileError> {
15311531
#[cfg(debug_assertions)]
15321532
if let Err(err) = function.validate() {
15331533
debug!("ZJIT: compile_iseq: {err:?}");
1534+
use crate::hir::ParseError;
15341535
return Err(CompileError::ParseError(ParseError::Validation(err)));
15351536
}
15361537
Ok(function)

0 commit comments

Comments
 (0)