2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: DataflowConstProp
|
2022-08-25 11:43:46 -05:00
|
|
|
|
|
|
|
// EMIT_MIR cast.main.DataflowConstProp.diff
|
2024-01-07 23:16:22 -06:00
|
|
|
|
|
|
|
// CHECK-LABEL: fn main(
|
2022-08-25 11:43:46 -05:00
|
|
|
fn main() {
|
2024-01-07 23:16:22 -06:00
|
|
|
// CHECK: debug a => [[a:_.*]];
|
|
|
|
// CHECK: debug b => [[b:_.*]];
|
|
|
|
|
|
|
|
// CHECK: [[a]] = const 257_i32;
|
2022-08-25 11:43:46 -05:00
|
|
|
let a = 257;
|
2024-01-07 23:16:22 -06:00
|
|
|
// CHECK: [[b]] = const 2_u8;
|
2022-11-09 11:03:30 -06:00
|
|
|
let b = a as u8 + 1;
|
2022-08-25 11:43:46 -05:00
|
|
|
}
|