]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2014 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 | #![crate_type="lib"] | |
12 | #![deny(warnings)] | |
13 | ||
14 | pub use src::aliases::B; | |
15 | pub use src::hidden_core::make; | |
16 | ||
17 | mod src { | |
18 | pub mod aliases { | |
19 | use super::hidden_core::A; | |
20 | pub type B = A; | |
21 | } | |
22 | ||
23 | pub mod hidden_core { | |
24 | use super::aliases::B; | |
25 | ||
c34b1796 | 26 | #[derive(Copy, Clone)] |
1a4d82fc JJ |
27 | pub struct A; |
28 | ||
1a4d82fc JJ |
29 | pub fn make() -> B { A } |
30 | ||
31 | impl A { | |
32 | pub fn foo(&mut self) { println!("called foo"); } | |
33 | } | |
34 | } | |
35 | } |