about summary refs log tree commit diff
path: root/tests/ui/resolve/issue-31845.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/resolve/issue-31845.rs')
-rw-r--r--tests/ui/resolve/issue-31845.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-31845.rs b/tests/ui/resolve/issue-31845.rs
new file mode 100644
index 00000000000..f6dc11502ba
--- /dev/null
+++ b/tests/ui/resolve/issue-31845.rs
@@ -0,0 +1,12 @@
+// Checks lexical scopes cannot see through normal module boundaries
+
+fn f() {
+    fn g() {}
+    mod foo {
+        fn h() {
+           g(); //~ ERROR cannot find function `g` in this scope
+        }
+    }
+}
+
+fn main() {}