From 8a9d09aa5d300b8cc7257789648f72d5704eb27b Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Fri, 16 Oct 2026 17:01:17 +0000 Subject: [PATCH] =?UTF-8?q?style:=20=E8=87=AA=E5=8A=A8=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_emit/tests/emit_ir_tests.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/oxide_emit/tests/emit_ir_tests.rs b/crates/oxide_emit/tests/emit_ir_tests.rs index 47365402..0d3c934c 100644 --- a/crates/oxide_emit/tests/emit_ir_tests.rs +++ b/crates/oxide_emit/tests/emit_ir_tests.rs @@ -597,12 +597,12 @@ fn static_block_this_reads_ctor_vreg_beyond_u8() { .filter(|i| i.op == OpCode::LOAD_VAR) .find(|i| matches!(i.a, Operand::Reg(_))) .expect("静态块 this 应发 LOAD_VAR Reg"); - let Operand::Reg(r) = this_load.a else { - unreachable!() - }; + let Operand::Reg(r) = this_load.a else { unreachable!() }; assert!(r > 255, "静态块 this 的构造器 vreg 号应越过 255:{r}"); assert!( - !ir.insts.iter().any(|i| i.op == OpCode::LOAD_VAR && matches!(i.a, Operand::This)), + !ir.insts + .iter() + .any(|i| i.op == OpCode::LOAD_VAR && matches!(i.a, Operand::This)), "静态块 this 不应走 this 槽" ); }