diff options
| author | dianqk <dianqk@dianqk.net> | 2025-06-30 19:23:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-30 19:23:14 +0800 |
| commit | 384d6998939f6577b8b37dae5fd7b661e941f7af (patch) | |
| tree | 5fc63cb5388ba06bdf22f501df9dbd20be17d957 /tests/ui/modules | |
| parent | f19142044f270760ce0ebc03b2c3a44217d8703d (diff) | |
| parent | d0bd27924e69084f11290e7876ee63b69c0d9667 (diff) | |
| download | rust-384d6998939f6577b8b37dae5fd7b661e941f7af.tar.gz rust-384d6998939f6577b8b37dae5fd7b661e941f7af.zip | |
Rollup merge of #142429 - Kivooeo:tf13, r=jieyouxu
`tests/ui`: A New Order [13/N] Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895. r? ```@jieyouxu```
Diffstat (limited to 'tests/ui/modules')
| -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(); +} |
