]>
Commit | Line | Data |
---|---|---|
85aaf69f SL |
1 | // Copyright 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 | // sub-module in a sub-directory | |
12 | ||
13 | use sub::sub2 as msalias; | |
14 | use sub::sub2; | |
85aaf69f SL |
15 | |
16 | static yy: usize = 25; | |
17 | ||
18 | mod sub { | |
19 | pub mod sub2 { | |
85aaf69f | 20 | pub mod sub3 { |
85aaf69f | 21 | pub fn hello() { |
9346a6ac | 22 | println!("hello from module 3"); |
85aaf69f SL |
23 | } |
24 | } | |
25 | pub fn hello() { | |
9346a6ac | 26 | println!("hello from a module"); |
85aaf69f SL |
27 | } |
28 | ||
29 | pub struct nested_struct { | |
30 | pub field2: u32, | |
31 | } | |
32 | } | |
33 | } | |
34 | ||
35 | pub struct SubStruct { | |
36 | pub name: String | |
37 | } |