]> git.proxmox.com Git - rustc.git/blame - src/test/codegen-units/partitioning/regular-modules.rs
New upstream version 1.28.0~beta.14+dfsg1
[rustc.git] / src / test / codegen-units / partitioning / regular-modules.rs
CommitLineData
a7813a04
XL
1// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11// ignore-tidy-linelength
12// We specify -Z incremental here because we want to test the partitioning for
13// incremental compilation
94b46f34 14// compile-flags:-Zprint-mono-items=eager -Zincremental=tmp/partitioning-tests/regular-modules
a7813a04
XL
15
16#![allow(dead_code)]
17#![crate_type="lib"]
18
94b46f34 19//~ MONO_ITEM fn regular_modules::foo[0] @@ regular_modules[Internal]
a7813a04
XL
20fn foo() {}
21
94b46f34 22//~ MONO_ITEM fn regular_modules::bar[0] @@ regular_modules[Internal]
a7813a04
XL
23fn bar() {}
24
94b46f34 25//~ MONO_ITEM static regular_modules::BAZ[0] @@ regular_modules[Internal]
a7813a04
XL
26static BAZ: u64 = 0;
27
28mod mod1 {
29
94b46f34 30 //~ MONO_ITEM fn regular_modules::mod1[0]::foo[0] @@ regular_modules-mod1[Internal]
a7813a04 31 fn foo() {}
94b46f34 32 //~ MONO_ITEM fn regular_modules::mod1[0]::bar[0] @@ regular_modules-mod1[Internal]
a7813a04 33 fn bar() {}
94b46f34 34 //~ MONO_ITEM static regular_modules::mod1[0]::BAZ[0] @@ regular_modules-mod1[Internal]
a7813a04
XL
35 static BAZ: u64 = 0;
36
37 mod mod1 {
94b46f34 38 //~ MONO_ITEM fn regular_modules::mod1[0]::mod1[0]::foo[0] @@ regular_modules-mod1-mod1[Internal]
a7813a04 39 fn foo() {}
94b46f34 40 //~ MONO_ITEM fn regular_modules::mod1[0]::mod1[0]::bar[0] @@ regular_modules-mod1-mod1[Internal]
a7813a04 41 fn bar() {}
94b46f34 42 //~ MONO_ITEM static regular_modules::mod1[0]::mod1[0]::BAZ[0] @@ regular_modules-mod1-mod1[Internal]
a7813a04
XL
43 static BAZ: u64 = 0;
44 }
45
46 mod mod2 {
94b46f34 47 //~ MONO_ITEM fn regular_modules::mod1[0]::mod2[0]::foo[0] @@ regular_modules-mod1-mod2[Internal]
a7813a04 48 fn foo() {}
94b46f34 49 //~ MONO_ITEM fn regular_modules::mod1[0]::mod2[0]::bar[0] @@ regular_modules-mod1-mod2[Internal]
a7813a04 50 fn bar() {}
94b46f34 51 //~ MONO_ITEM static regular_modules::mod1[0]::mod2[0]::BAZ[0] @@ regular_modules-mod1-mod2[Internal]
a7813a04
XL
52 static BAZ: u64 = 0;
53 }
54}
55
56mod mod2 {
57
94b46f34 58 //~ MONO_ITEM fn regular_modules::mod2[0]::foo[0] @@ regular_modules-mod2[Internal]
a7813a04 59 fn foo() {}
94b46f34 60 //~ MONO_ITEM fn regular_modules::mod2[0]::bar[0] @@ regular_modules-mod2[Internal]
a7813a04 61 fn bar() {}
94b46f34 62 //~ MONO_ITEM static regular_modules::mod2[0]::BAZ[0] @@ regular_modules-mod2[Internal]
a7813a04
XL
63 static BAZ: u64 = 0;
64
65 mod mod1 {
94b46f34 66 //~ MONO_ITEM fn regular_modules::mod2[0]::mod1[0]::foo[0] @@ regular_modules-mod2-mod1[Internal]
a7813a04 67 fn foo() {}
94b46f34 68 //~ MONO_ITEM fn regular_modules::mod2[0]::mod1[0]::bar[0] @@ regular_modules-mod2-mod1[Internal]
a7813a04 69 fn bar() {}
94b46f34 70 //~ MONO_ITEM static regular_modules::mod2[0]::mod1[0]::BAZ[0] @@ regular_modules-mod2-mod1[Internal]
a7813a04
XL
71 static BAZ: u64 = 0;
72 }
73
74 mod mod2 {
94b46f34 75 //~ MONO_ITEM fn regular_modules::mod2[0]::mod2[0]::foo[0] @@ regular_modules-mod2-mod2[Internal]
a7813a04 76 fn foo() {}
94b46f34 77 //~ MONO_ITEM fn regular_modules::mod2[0]::mod2[0]::bar[0] @@ regular_modules-mod2-mod2[Internal]
a7813a04 78 fn bar() {}
94b46f34 79 //~ MONO_ITEM static regular_modules::mod2[0]::mod2[0]::BAZ[0] @@ regular_modules-mod2-mod2[Internal]
a7813a04
XL
80 static BAZ: u64 = 0;
81 }
82}