about summary refs log tree commit diff
path: root/tests/ui/modules/nested-modules-basic.rs
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-07-04 11:07:48 +0200
committerJakub Beránek <berykubik@gmail.com>2025-07-04 11:07:48 +0200
commitc33dd1b306db360f92c46f1cab79e68e6a845bf5 (patch)
tree3fa8e6c5426eb1fa41b4ac3e6ebeaa322ab89688 /tests/ui/modules/nested-modules-basic.rs
parentac1a8b398b8c0f33e982ba736d31492d911c3050 (diff)
parentc96a69059ecc618b519da385a6ccd03155aa0237 (diff)
downloadrust-c33dd1b306db360f92c46f1cab79e68e6a845bf5.tar.gz
rust-c33dd1b306db360f92c46f1cab79e68e6a845bf5.zip
Merge ref 'c96a69059ecc' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: c96a69059ecc618b519da385a6ccd03155aa0237
Filtered ref: 7b9552d4c39c31aabf6749629da2d4a7e6e1cd60

This merge was created using https://github.com/rust-lang/josh-sync.
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();
+}