]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | // Copyright 2012-2015 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 | // compile-flags:-Zprint-trans-items=eager | |
13 | ||
14 | #![deny(dead_code)] | |
15 | ||
16 | //~ TRANS_ITEM fn non_generic_functions::foo[0] | |
17 | fn foo() { | |
18 | { | |
19 | //~ TRANS_ITEM fn non_generic_functions::foo[0]::foo[0] | |
20 | fn foo() {} | |
21 | foo(); | |
22 | } | |
23 | ||
24 | { | |
25 | //~ TRANS_ITEM fn non_generic_functions::foo[0]::foo[1] | |
26 | fn foo() {} | |
27 | foo(); | |
28 | } | |
29 | } | |
30 | ||
31 | //~ TRANS_ITEM fn non_generic_functions::bar[0] | |
32 | fn bar() { | |
33 | //~ TRANS_ITEM fn non_generic_functions::bar[0]::baz[0] | |
34 | fn baz() {} | |
35 | baz(); | |
36 | } | |
37 | ||
38 | struct Struct { _x: i32 } | |
39 | ||
40 | impl Struct { | |
54a0048b | 41 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::foo[0] |
7453a54e SL |
42 | fn foo() { |
43 | { | |
54a0048b | 44 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::foo[0]::foo[0] |
7453a54e SL |
45 | fn foo() {} |
46 | foo(); | |
47 | } | |
48 | ||
49 | { | |
54a0048b | 50 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::foo[0]::foo[1] |
7453a54e SL |
51 | fn foo() {} |
52 | foo(); | |
53 | } | |
54 | } | |
55 | ||
54a0048b | 56 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::bar[0] |
7453a54e SL |
57 | fn bar(&self) { |
58 | { | |
54a0048b | 59 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::bar[0]::foo[0] |
7453a54e SL |
60 | fn foo() {} |
61 | foo(); | |
62 | } | |
63 | ||
64 | { | |
54a0048b | 65 | //~ TRANS_ITEM fn non_generic_functions::{{impl}}[0]::bar[0]::foo[1] |
7453a54e SL |
66 | fn foo() {} |
67 | foo(); | |
68 | } | |
69 | } | |
70 | } | |
71 | ||
72 | //~ TRANS_ITEM fn non_generic_functions::main[0] | |
73 | fn main() { | |
74 | foo(); | |
75 | bar(); | |
76 | Struct::foo(); | |
77 | let x = Struct { _x: 0 }; | |
78 | x.bar(); | |
79 | } | |
80 | ||
81 | //~ TRANS_ITEM drop-glue i8 |