about summary refs log tree commit diff
path: root/tests/ui/borrowck/borrowck-block-unint.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/borrowck-block-unint.rs')
-rw-r--r--tests/ui/borrowck/borrowck-block-unint.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-block-unint.rs b/tests/ui/borrowck/borrowck-block-unint.rs
new file mode 100644
index 00000000000..8d13b25a357
--- /dev/null
+++ b/tests/ui/borrowck/borrowck-block-unint.rs
@@ -0,0 +1,7 @@
+fn force<F>(f: F) where F: FnOnce() { f(); }
+fn main() {
+    let x: isize;
+    force(|| {  //~ ERROR E0381
+        println!("{}", x);
+    });
+}