2023-10-16 12:36:39 -05:00
|
|
|
// skip-filecheck
|
2023-06-08 02:18:34 -05:00
|
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
2022-12-04 13:20:55 -06:00
|
|
|
//@ unit-test: SimplifyLocals-before-const-prop
|
2019-10-17 05:46:51 -05:00
|
|
|
//@ compile-flags: -C overflow-checks=no
|
|
|
|
|
2020-02-05 05:17:41 -06:00
|
|
|
fn use_zst(_: ((), ())) {}
|
2019-10-17 05:46:51 -05:00
|
|
|
|
|
|
|
struct Temp {
|
2020-02-05 05:17:41 -06:00
|
|
|
x: u8,
|
2019-10-17 05:46:51 -05:00
|
|
|
}
|
|
|
|
|
2020-02-05 05:17:41 -06:00
|
|
|
fn use_u8(_: u8) {}
|
2019-10-17 05:46:51 -05:00
|
|
|
|
2022-12-04 13:20:55 -06:00
|
|
|
// EMIT_MIR simplify_locals_removes_unused_consts.main.SimplifyLocals-before-const-prop.diff
|
2019-10-17 05:46:51 -05:00
|
|
|
fn main() {
|
|
|
|
let ((), ()) = ((), ());
|
|
|
|
use_zst(((), ()));
|
|
|
|
|
2020-02-05 05:17:41 -06:00
|
|
|
use_u8((Temp { x: 40 }).x + 2);
|
2019-10-17 05:46:51 -05:00
|
|
|
}
|