]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/const_prop/optimizes_into_variable.rs
rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all
[rust.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 optimizes_into_variable.main.ConstProp.diff
10 // EMIT_MIR optimizes_into_variable.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 }