]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/storage_live_dead_in_statics.rs
Rollup merge of #100382 - jackh726:gat-self-outlives-input, r=compiler-errors
[rust.git] / src / test / mir-opt / storage_live_dead_in_statics.rs
1 // Check that when we compile the static `XXX` into MIR, we do not
2 // generate `StorageStart` or `StorageEnd` statements.
3
4 // EMIT_MIR storage_live_dead_in_statics.XXX.mir_map.0.mir
5 static XXX: &'static Foo = &Foo {
6     tup: "hi",
7     data: &[
8         (0, 1), (0, 2), (0, 3),
9         (0, 1), (0, 2), (0, 3),
10         (0, 1), (0, 2), (0, 3),
11         (0, 1), (0, 2), (0, 3),
12         (0, 1), (0, 2), (0, 3),
13         (0, 1), (0, 2), (0, 3),
14         (0, 1), (0, 2), (0, 3),
15         (0, 1), (0, 2), (0, 3),
16         (0, 1), (0, 2), (0, 3),
17         (0, 1), (0, 2), (0, 3),
18         (0, 1), (0, 2), (0, 3),
19         (0, 1), (0, 2), (0, 3),
20         (0, 1), (0, 2), (0, 3),
21         (0, 1), (0, 2), (0, 3),
22     ]
23 };
24
25 #[derive(Debug)]
26 struct Foo {
27     tup: &'static str,
28     data: &'static [(u32, u32)]
29 }
30
31 fn main() {
32     println!("{:?}", XXX);
33 }