Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
359 B
Rust
Raw Normal View History

2023-04-05 09:44:20 +01:00
// ignore-wasm32 compiled with panic=abort by default
//! Tests that we can propagate into places that are projections into unions
// compile-flags: -Zunsound-mir-opts
2020-05-24 21:37:09 +02:00
fn val() -> u32 {
1
}
2020-09-12 15:10:51 +02:00
// EMIT_MIR union.main.DestinationPropagation.diff
2020-05-24 21:37:09 +02:00
fn main() {
union Un {
us: u32,
}
let un = Un { us: val() };
drop(unsafe { un.us });
}