diff options
Diffstat (limited to 'tests/ui/modules/mod-pub-access.rs')
| -rw-r--r-- | tests/ui/modules/mod-pub-access.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/modules/mod-pub-access.rs b/tests/ui/modules/mod-pub-access.rs new file mode 100644 index 00000000000..c07e7a2ff30 --- /dev/null +++ b/tests/ui/modules/mod-pub-access.rs @@ -0,0 +1,11 @@ +//@ run-pass +// This is a name resolution smoke test that ensures paths with more than one +// segment (e.g., `foo::bar`) resolve correctly. +// It also serves as a basic visibility test — confirming that a `pub` item +// inside a private module can still be accessed from outside that module. + +mod foo { + pub fn bar(_offset: usize) {} +} + +fn main() { foo::bar(0); } |
