]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/deaggregator_test.rs
Rollup merge of #65389 - ecstatic-morse:zero-sized-array-no-drop, r=eddyb
[rust.git] / src / test / mir-opt / deaggregator_test.rs
1 struct Baz {
2     x: usize,
3     y: f32,
4     z: bool,
5 }
6
7 fn bar(a: usize) -> Baz {
8     Baz { x: a, y: 0.0, z: false }
9 }
10
11 fn main() {
12     // Make sure the function actually gets instantiated.
13     bar(0);
14 }
15
16 // END RUST SOURCE
17 // START rustc.bar.Deaggregator.before.mir
18 // bb0: {
19 //     ...
20 //     _2 = _1;
21 //     ...
22 //     _0 = Baz { x: move _2, y: const 0f32, z: const false };
23 //     ...
24 //     return;
25 // }
26 // END rustc.bar.Deaggregator.before.mir
27 // START rustc.bar.Deaggregator.after.mir
28 // bb0: {
29 //     ...
30 //     _2 = _1;
31 //     ...
32 //     (_0.0: usize) = move _2;
33 //     (_0.1: f32) = const 0f32;
34 //     (_0.2: bool) = const false;
35 //     ...
36 //     return;
37 // }
38 // END rustc.bar.Deaggregator.after.mir