summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/cast.rs
blob: b81c2740a73d0b3c5b5d04068e66fe0b61612143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// unit-test: ConstProp
// EMIT_MIR cast.main.ConstProp.diff

fn main() {
    // CHECK-LABEL: fn main(
    // CHECK: debug x => [[x:_.*]];
    // CHECK: debug y => [[y:_.*]];
    // CHECK: [[x]] = const 42_u32;
    // CHECK: [[y]] = const 42_u8;
    let x = 42u8 as u32;
    let y = 42u32 as u8;
}