]> git.lizzy.rs Git - rust.git/blob - src/test/codegen-units/partitioning/local-inlining-but-not-all.rs
run EndRegion when unwinding otherwise-empty scopes
[rust.git] / src / test / codegen-units / partitioning / local-inlining-but-not-all.rs
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
14 // compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining-but-not-all
15 // compile-flags:-Zinline-in-all-cgus=no
16
17 #![allow(dead_code)]
18 #![crate_type="lib"]
19
20 mod inline {
21
22     //~ TRANS_ITEM fn local_inlining_but_not_all::inline[0]::inlined_function[0] @@ local_inlining_but_not_all-inline[External]
23     #[inline(always)]
24     pub fn inlined_function()
25     {
26
27     }
28 }
29
30 mod user1 {
31     use super::inline;
32
33     //~ TRANS_ITEM fn local_inlining_but_not_all::user1[0]::foo[0] @@ local_inlining_but_not_all-user1[Internal]
34     fn foo() {
35         inline::inlined_function();
36     }
37 }
38
39 mod user2 {
40     use super::inline;
41
42     //~ TRANS_ITEM fn local_inlining_but_not_all::user2[0]::bar[0] @@ local_inlining_but_not_all-user2[Internal]
43     fn bar() {
44         inline::inlined_function();
45     }
46 }
47
48 mod non_user {
49
50     //~ TRANS_ITEM fn local_inlining_but_not_all::non_user[0]::baz[0] @@ local_inlining_but_not_all-non_user[Internal]
51     fn baz() {
52
53     }
54 }