]> git.proxmox.com Git - rustc.git/blame - src/test/run-make/save-analysis/SubDir/mod.rs
Imported Upstream version 1.0.0~beta.3
[rustc.git] / src / test / run-make / save-analysis / SubDir / mod.rs
CommitLineData
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
13use sub::sub2 as msalias;
14use sub::sub2;
85aaf69f
SL
15
16static yy: usize = 25;
17
18mod 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
35pub struct SubStruct {
36 pub name: String
37}