Normalize passes keep spans and clean warnings
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user