about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/cast.rs
blob: a70cc8ee6a22db4438b89ac50d85b243a9f45d84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ test-mir-pass: DataflowConstProp

// EMIT_MIR cast.main.DataflowConstProp.diff

// CHECK-LABEL: fn main(
fn main() {
    // CHECK: debug a => [[a:_.*]];
    // CHECK: debug b => [[b:_.*]];

    // CHECK: [[a]] = const 257_i32;
    let a = 257;
    // CHECK: [[b]] = const 2_u8;
    let b = a as u8 + 1;
}