Normalize passes keep spans and clean warnings

This commit is contained in:
nyash-codex
2025-11-24 15:02:51 +09:00
parent 466e636af6
commit da1a5558e5
40 changed files with 547 additions and 362 deletions

View File

@ -9,8 +9,8 @@ pub fn check_no_legacy_ops(function: &MirFunction) -> Result<(), Vec<Verificatio
}
let mut errors = Vec::new();
for (bid, block) in &function.blocks {
for (idx, inst) in block.all_instructions().enumerate() {
let legacy_name = match inst {
for (idx, sp) in block.all_spanned_instructions_enumerated() {
let legacy_name = match sp.inst {
MirInstruction::TypeCheck { .. } => Some("TypeCheck"), // -> TypeOp(Check)
MirInstruction::Cast { .. } => Some("Cast"), // -> TypeOp(Cast)
MirInstruction::WeakNew { .. } => Some("WeakNew"), // -> WeakRef(New)