diff options
| author | Ralf Jung <post@ralfj.de> | 2025-07-01 05:35:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 05:35:39 +0000 |
| commit | 83d519c6d0647b25fb1562bcb60e8a3ed244db5a (patch) | |
| tree | f9b1d65029bae680aeee8b28cf45562660ea5fbc /tests/ui/modules/nested-modules-basic.rs | |
| parent | 8bb5f8cae4607190b92db6693bb5ab5931d82412 (diff) | |
| parent | 8958967fd498ad2e4fbaf08085e6ba3872776089 (diff) | |
| download | rust-83d519c6d0647b25fb1562bcb60e8a3ed244db5a.tar.gz rust-83d519c6d0647b25fb1562bcb60e8a3ed244db5a.zip | |
Merge pull request #4431 from rust-lang/rustup-2025-07-01
Automatic Rustup
Diffstat (limited to 'tests/ui/modules/nested-modules-basic.rs')
| -rw-r--r-- | tests/ui/modules/nested-modules-basic.rs | 19 |
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(); +} |
