summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/issue-104700-inner_scope.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/resolve/issue-104700-inner_scope.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-104700-inner_scope.rs b/tests/ui/resolve/issue-104700-inner_scope.rs
new file mode 100644
index 000000000..e8f28c113
--- /dev/null
+++ b/tests/ui/resolve/issue-104700-inner_scope.rs
@@ -0,0 +1,11 @@
+fn main() {
+ let foo = 1;
+ {
+ let bar = 2;
+ let test_func = |x| x > 3;
+ }
+ if bar == 2 { //~ ERROR cannot find value
+ println!("yes");
+ }
+ test_func(1); //~ ERROR cannot find function
+}