]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/const_prop/optimizes_into_variable.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / mir-opt / const_prop / optimizes_into_variable.rs
1 // compile-flags: -C overflow-checks=on
2
3 struct Point {
4 x: u32,
5 y: u32,
6 }
7
8 // EMIT_MIR_FOR_EACH_BIT_WIDTH
9 // EMIT_MIR rustc.main.ConstProp.diff
10 // EMIT_MIR rustc.main.SimplifyLocals.after.mir
11 fn main() {
12 let x = 2 + 2;
13 let y = [0, 1, 2, 3, 4, 5][3];
14 let z = (Point { x: 12, y: 42}).y;
15 }