]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify-locals-removes-unused-consts.rs
Fix wrong argument in autoderef process
[rust.git] / src / test / mir-opt / simplify-locals-removes-unused-consts.rs
1 // compile-flags: -C overflow-checks=no
2
3 fn use_zst(_: ((), ())) {}
4
5 struct Temp {
6     x: u8,
7 }
8
9 fn use_u8(_: u8) {}
10
11 // EMIT_MIR rustc.main.SimplifyLocals.diff
12 fn main() {
13     let ((), ()) = ((), ());
14     use_zst(((), ()));
15
16     use_u8((Temp { x: 40 }).x + 2);
17 }