]> git.proxmox.com Git - rustc.git/blob - src/test/codegen-units/partitioning/regular-modules.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / codegen-units / partitioning / regular-modules.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=eager
5
6 #![allow(dead_code)]
7 #![crate_type="lib"]
8
9 //~ MONO_ITEM fn foo @@ regular_modules[Internal]
10 fn foo() {}
11
12 //~ MONO_ITEM fn bar @@ regular_modules[Internal]
13 fn bar() {}
14
15 //~ MONO_ITEM static BAZ @@ regular_modules[Internal]
16 static BAZ: u64 = 0;
17
18 mod mod1 {
19
20 //~ MONO_ITEM fn mod1::foo @@ regular_modules-mod1[Internal]
21 fn foo() {}
22 //~ MONO_ITEM fn mod1::bar @@ regular_modules-mod1[Internal]
23 fn bar() {}
24 //~ MONO_ITEM static mod1::BAZ @@ regular_modules-mod1[Internal]
25 static BAZ: u64 = 0;
26
27 mod mod1 {
28 //~ MONO_ITEM fn mod1::mod1::foo @@ regular_modules-mod1-mod1[Internal]
29 fn foo() {}
30 //~ MONO_ITEM fn mod1::mod1::bar @@ regular_modules-mod1-mod1[Internal]
31 fn bar() {}
32 //~ MONO_ITEM static mod1::mod1::BAZ @@ regular_modules-mod1-mod1[Internal]
33 static BAZ: u64 = 0;
34 }
35
36 mod mod2 {
37 //~ MONO_ITEM fn mod1::mod2::foo @@ regular_modules-mod1-mod2[Internal]
38 fn foo() {}
39 //~ MONO_ITEM fn mod1::mod2::bar @@ regular_modules-mod1-mod2[Internal]
40 fn bar() {}
41 //~ MONO_ITEM static mod1::mod2::BAZ @@ regular_modules-mod1-mod2[Internal]
42 static BAZ: u64 = 0;
43 }
44 }
45
46 mod mod2 {
47
48 //~ MONO_ITEM fn mod2::foo @@ regular_modules-mod2[Internal]
49 fn foo() {}
50 //~ MONO_ITEM fn mod2::bar @@ regular_modules-mod2[Internal]
51 fn bar() {}
52 //~ MONO_ITEM static mod2::BAZ @@ regular_modules-mod2[Internal]
53 static BAZ: u64 = 0;
54
55 mod mod1 {
56 //~ MONO_ITEM fn mod2::mod1::foo @@ regular_modules-mod2-mod1[Internal]
57 fn foo() {}
58 //~ MONO_ITEM fn mod2::mod1::bar @@ regular_modules-mod2-mod1[Internal]
59 fn bar() {}
60 //~ MONO_ITEM static mod2::mod1::BAZ @@ regular_modules-mod2-mod1[Internal]
61 static BAZ: u64 = 0;
62 }
63
64 mod mod2 {
65 //~ MONO_ITEM fn mod2::mod2::foo @@ regular_modules-mod2-mod2[Internal]
66 fn foo() {}
67 //~ MONO_ITEM fn mod2::mod2::bar @@ regular_modules-mod2-mod2[Internal]
68 fn bar() {}
69 //~ MONO_ITEM static mod2::mod2::BAZ @@ regular_modules-mod2-mod2[Internal]
70 static BAZ: u64 = 0;
71 }
72 }