about summary refs log tree commit diff
path: root/tests/ui/modules/module-super-access.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/modules/module-super-access.rs')
-rw-r--r--tests/ui/modules/module-super-access.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/modules/module-super-access.rs b/tests/ui/modules/module-super-access.rs
new file mode 100644
index 00000000000..8acba607f6c
--- /dev/null
+++ b/tests/ui/modules/module-super-access.rs
@@ -0,0 +1,16 @@
+//! Check path resolution using `super`
+
+//@ run-pass
+
+#![allow(dead_code)]
+
+pub mod a {
+    pub fn f() {}
+    pub mod b {
+        fn g() {
+            super::f(); // Accessing `f` from module `a` (parent of `b`)
+        }
+    }
+}
+
+pub fn main() {}