]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/issue-10806.rs
Rollup merge of #51722 - Aaronepower:master, r=Mark-Simulacrum
[rust.git] / src / test / run-pass / issue-10806.rs
1 // Copyright 2013-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
12 // pretty-expanded FIXME #23616
13
14 pub fn foo() -> isize {
15     3
16 }
17 pub fn bar() -> isize {
18     4
19 }
20
21 pub mod baz {
22     use {foo, bar};
23     pub fn quux() -> isize {
24         foo() + bar()
25     }
26 }
27
28 pub mod grault {
29     use {foo};
30     pub fn garply() -> isize {
31         foo()
32     }
33 }
34
35 pub mod waldo {
36     use {};
37     pub fn plugh() -> isize {
38         0
39     }
40 }
41
42 pub fn main() {
43     let _x = baz::quux();
44     let _y = grault::garply();
45     let _z = waldo::plugh();
46 }