]> git.lizzy.rs Git - rust.git/blob - src/test/codegen-units/partitioning/regular-modules.rs
remove pat2021
[rust.git] / src / test / codegen-units / partitioning / regular-modules.rs
1 // We specify -C incremental here because we want to test the partitioning for
2 // incremental compilation
3 // compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules
4
5 #![allow(dead_code)]
6 #![crate_type="lib"]
7
8 //~ MONO_ITEM fn foo @@ regular_modules[Internal]
9 fn foo() {}
10
11 //~ MONO_ITEM fn bar @@ regular_modules[Internal]
12 fn bar() {}
13
14 //~ MONO_ITEM static BAZ @@ regular_modules[Internal]
15 static BAZ: u64 = 0;
16
17 mod mod1 {
18
19     //~ MONO_ITEM fn mod1::foo @@ regular_modules-mod1[Internal]
20     fn foo() {}
21     //~ MONO_ITEM fn mod1::bar @@ regular_modules-mod1[Internal]
22     fn bar() {}
23     //~ MONO_ITEM static mod1::BAZ @@ regular_modules-mod1[Internal]
24     static BAZ: u64 = 0;
25
26     mod mod1 {
27         //~ MONO_ITEM fn mod1::mod1::foo @@ regular_modules-mod1-mod1[Internal]
28         fn foo() {}
29         //~ MONO_ITEM fn mod1::mod1::bar @@ regular_modules-mod1-mod1[Internal]
30         fn bar() {}
31         //~ MONO_ITEM static mod1::mod1::BAZ @@ regular_modules-mod1-mod1[Internal]
32         static BAZ: u64 = 0;
33     }
34
35     mod mod2 {
36         //~ MONO_ITEM fn mod1::mod2::foo @@ regular_modules-mod1-mod2[Internal]
37         fn foo() {}
38         //~ MONO_ITEM fn mod1::mod2::bar @@ regular_modules-mod1-mod2[Internal]
39         fn bar() {}
40         //~ MONO_ITEM static mod1::mod2::BAZ @@ regular_modules-mod1-mod2[Internal]
41         static BAZ: u64 = 0;
42     }
43 }
44
45 mod mod2 {
46
47     //~ MONO_ITEM fn mod2::foo @@ regular_modules-mod2[Internal]
48     fn foo() {}
49     //~ MONO_ITEM fn mod2::bar @@ regular_modules-mod2[Internal]
50     fn bar() {}
51     //~ MONO_ITEM static mod2::BAZ @@ regular_modules-mod2[Internal]
52     static BAZ: u64 = 0;
53
54     mod mod1 {
55         //~ MONO_ITEM fn mod2::mod1::foo @@ regular_modules-mod2-mod1[Internal]
56         fn foo() {}
57         //~ MONO_ITEM fn mod2::mod1::bar @@ regular_modules-mod2-mod1[Internal]
58         fn bar() {}
59         //~ MONO_ITEM static mod2::mod1::BAZ @@ regular_modules-mod2-mod1[Internal]
60         static BAZ: u64 = 0;
61     }
62
63     mod mod2 {
64         //~ MONO_ITEM fn mod2::mod2::foo @@ regular_modules-mod2-mod2[Internal]
65         fn foo() {}
66         //~ MONO_ITEM fn mod2::mod2::bar @@ regular_modules-mod2-mod2[Internal]
67         fn bar() {}
68         //~ MONO_ITEM static mod2::mod2::BAZ @@ regular_modules-mod2-mod2[Internal]
69         static BAZ: u64 = 0;
70     }
71 }