Files
rust/tests/mir-opt/pre-codegen/spans.rs
T
Zalathar 58f8739d55 Migrate mir-opt tests from PreCodegen to runtime-optimized
MIR dumped before/after the dummy `PreCodegen` pass should be identical to MIR
dumped after the phase transition to `runtime-optimized`.
2026-05-13 15:40:23 +10:00

17 lines
335 B
Rust

//@ skip-filecheck
// Test that the comments we emit in MIR opts are accurate.
//
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ compile-flags: -Zmir-include-spans -C debuginfo=full
#![crate_type = "lib"]
// EMIT_MIR spans.outer.runtime-optimized.after.mir
pub fn outer(v: u8) -> u8 {
inner(&v)
}
pub fn inner(x: &u8) -> u8 {
*x
}