about summary refs log tree commit diff
path: root/tests/ui/modules/nested-modules-basic.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2025-07-01 05:05:50 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2025-07-01 05:05:50 +0000
commite6371c9379b63cb18aea2acb0c1b76e828150f0b (patch)
tree8ef29ca518789e149c0b2e6c4d8e45d96264cde7 /tests/ui/modules/nested-modules-basic.rs
parent0c3c9e4438379bb49d45961122e4deaacdb0fa4b (diff)
parentc3fb7d1d1c3d05be8ed3abdfd01196782f6c7821 (diff)
downloadrust-e6371c9379b63cb18aea2acb0c1b76e828150f0b.tar.gz
rust-e6371c9379b63cb18aea2acb0c1b76e828150f0b.zip
Merge from rustc
Diffstat (limited to 'tests/ui/modules/nested-modules-basic.rs')
-rw-r--r--tests/ui/modules/nested-modules-basic.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/modules/nested-modules-basic.rs b/tests/ui/modules/nested-modules-basic.rs
new file mode 100644
index 00000000000..12eccec2808
--- /dev/null
+++ b/tests/ui/modules/nested-modules-basic.rs
@@ -0,0 +1,19 @@
+//! Basic test for nested module functionality and path resolution
+
+//@ 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();
+}