]> git.lizzy.rs Git - rust.git/blob - src/test/codegen-units/partitioning/statics.rs
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup
[rust.git] / src / test / codegen-units / partitioning / statics.rs
1 // We specify incremental here because we want to test the partitioning for
2 // incremental compilation
3 // incremental
4 // compile-flags:-Zprint-mono-items=lazy
5
6 #![crate_type="rlib"]
7
8 //~ MONO_ITEM static FOO @@ statics[Internal]
9 static FOO: u32 = 0;
10
11 //~ MONO_ITEM static BAR @@ statics[Internal]
12 static BAR: u32 = 0;
13
14 //~ MONO_ITEM fn function @@ statics[External]
15 pub fn function() {
16     //~ MONO_ITEM static function::FOO @@ statics[Internal]
17     static FOO: u32 = 0;
18
19     //~ MONO_ITEM static function::BAR @@ statics[Internal]
20     static BAR: u32 = 0;
21 }
22
23 pub mod mod1 {
24     //~ MONO_ITEM static mod1::FOO @@ statics-mod1[Internal]
25     static FOO: u32 = 0;
26
27     //~ MONO_ITEM static mod1::BAR @@ statics-mod1[Internal]
28     static BAR: u32 = 0;
29
30     //~ MONO_ITEM fn mod1::function @@ statics-mod1[External]
31     pub fn function() {
32         //~ MONO_ITEM static mod1::function::FOO @@ statics-mod1[Internal]
33         static FOO: u32 = 0;
34
35         //~ MONO_ITEM static mod1::function::BAR @@ statics-mod1[Internal]
36         static BAR: u32 = 0;
37     }
38 }