summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inner-module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/inner-module.rs')
-rw-r--r--src/test/ui/inner-module.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/inner-module.rs b/src/test/ui/inner-module.rs
new file mode 100644
index 000000000..363f753e2
--- /dev/null
+++ b/src/test/ui/inner-module.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+mod inner {
+ pub mod inner2 {
+ pub fn hello() { println!("hello, modular world"); }
+ }
+ pub fn hello() { inner2::hello(); }
+}
+
+pub fn main() { inner::hello(); inner::inner2::hello(); }