blob: 7a6f86b808509dbccafe35136d4eeaf0cfada5f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// compile-flags: -Zmir-opt-level=3
// Ensure RemoveZsts doesn't remove ZST assignments to union fields,
// which causes problems in Miri.
union Foo {
x: (),
y: u64,
}
// EMIT_MIR remove_zsts_dont_touch_unions.get_union.RemoveZsts.after.mir
fn get_union() -> Foo {
Foo { x: () }
}
fn main() {
get_union();
}
|