about summary refs log tree commit diff
path: root/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs')
-rw-r--r--src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs b/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs
index 010ddb792cc..9b9edce243b 100644
--- a/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs
+++ b/src/test/compile-fail/borrowck-call-is-borrow-issue-12224.rs
@@ -58,8 +58,10 @@ fn test6() {
 fn test7() {
     fn foo<F>(_: F) where F: FnMut(Box<FnMut(isize)>, isize) {}
     let mut f = |&mut: g: Box<FnMut(isize)>, b: isize| {};
-    f(box |a| { //~ ERROR: cannot borrow `f` as immutable because it is also borrowed as mutable
-        foo(f); //~ ERROR: cannot move out of captured outer variable
+    f(box |a| {
+        foo(f);
+        //~^ ERROR cannot move `f` into closure because it is borrowed
+        //~| ERROR cannot move out of captured outer variable in an `FnMut` closure
     }, 3);
 }