]>
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 drop-glue transitive_drop_glue::Root[0] | |
17 | struct Root(Intermediate); | |
18 | //~ TRANS_ITEM drop-glue transitive_drop_glue::Intermediate[0] | |
19 | struct Intermediate(Leaf); | |
20 | //~ TRANS_ITEM drop-glue transitive_drop_glue::Leaf[0] | |
21 | struct Leaf; | |
22 | ||
23 | impl Drop for Leaf { | |
54a0048b | 24 | //~ TRANS_ITEM fn transitive_drop_glue::{{impl}}[0]::drop[0] |
7453a54e SL |
25 | fn drop(&mut self) {} |
26 | } | |
27 | ||
28 | //~ TRANS_ITEM drop-glue transitive_drop_glue::Root[0] | |
29 | struct RootGen<T>(IntermediateGen<T>); | |
30 | //~ TRANS_ITEM drop-glue transitive_drop_glue::Root[0] | |
31 | struct IntermediateGen<T>(LeafGen<T>); | |
32 | //~ TRANS_ITEM drop-glue transitive_drop_glue::Root[0] | |
33 | struct LeafGen<T>(T); | |
34 | ||
35 | impl<T> Drop for LeafGen<T> { | |
36 | fn drop(&mut self) {} | |
37 | } | |
38 | ||
39 | //~ TRANS_ITEM fn transitive_drop_glue::main[0] | |
40 | fn main() { | |
41 | ||
42 | let _ = Root(Intermediate(Leaf)); | |
43 | ||
44 | //~ TRANS_ITEM drop-glue transitive_drop_glue::RootGen[0]<u32> | |
45 | //~ TRANS_ITEM drop-glue transitive_drop_glue::IntermediateGen[0]<u32> | |
46 | //~ TRANS_ITEM drop-glue transitive_drop_glue::LeafGen[0]<u32> | |
54a0048b | 47 | //~ TRANS_ITEM fn transitive_drop_glue::{{impl}}[1]::drop[0]<u32> |
7453a54e SL |
48 | let _ = RootGen(IntermediateGen(LeafGen(0u32))); |
49 | ||
50 | //~ TRANS_ITEM drop-glue transitive_drop_glue::RootGen[0]<i16> | |
51 | //~ TRANS_ITEM drop-glue transitive_drop_glue::IntermediateGen[0]<i16> | |
52 | //~ TRANS_ITEM drop-glue transitive_drop_glue::LeafGen[0]<i16> | |
54a0048b | 53 | //~ TRANS_ITEM fn transitive_drop_glue::{{impl}}[1]::drop[0]<i16> |
7453a54e SL |
54 | let _ = RootGen(IntermediateGen(LeafGen(0i16))); |
55 | } |