]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/simplify_locals_removes_unused_consts.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / mir-opt / simplify_locals_removes_unused_consts.rs
1 // unit-test: SimplifyLocals-before-const-prop
2 // compile-flags: -C overflow-checks=no
3
4 fn use_zst(_: ((), ())) {}
5
6 struct Temp {
7 x: u8,
8 }
9
10 fn use_u8(_: u8) {}
11
12 // EMIT_MIR simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.diff
13 fn main() {
14 let ((), ()) = ((), ());
15 use_zst(((), ()));
16
17 use_u8((Temp { x: 40 }).x + 2);
18 }