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