summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs')
-rw-r--r--tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs b/tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs
new file mode 100644
index 000000000..e6476b9c1
--- /dev/null
+++ b/tests/ui/borrowck/borrowck-init-in-called-fn-expr.rs
@@ -0,0 +1,7 @@
+fn main() {
+ let j = || -> isize {
+ let i: isize;
+ i //~ ERROR E0381
+ };
+ j();
+}