diff options
author | Jonathan Turner <jturner@mozilla.com> | 2016-04-21 15:56:06 -0700 |
---|---|---|
committer | Jonathan Turner <jturner@mozilla.com> | 2016-04-25 14:07:08 -0700 |
commit | 63087d7f2c052bd2a8b0813855fc01fecbc171a5 (patch) | |
tree | 95d65b158333ca0a7dcbc8825c624d007ecae28c | |
parent | 8c49b353b60adb2719f60ddba686c938d156d61f (diff) | |
download | rust-borrowck-snippet.tar.gz |
Fix last cfail testborrowck-snippet
-rw-r--r-- | src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs b/src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs index bde3212c5bc..6c412dcf6c6 100644 --- a/src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs +++ b/src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs @@ -60,22 +60,25 @@ fn borrow_after_move() { fn move_after_borrow() { let a: Box<_> = box B { x: box 0, y: box 1 }; let _x = &a.x; - //~^ NOTE borrow of `a.x` occurs here + //~^ NOTE borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot move + //~^ move out of `a.y` occurs here } fn copy_after_mut_borrow() { let mut a: Box<_> = box A { x: box 0, y: 1 }; let _x = &mut a.x; - //~^ NOTE borrow of `a.x` occurs here + //~^ NOTE borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot use + //~^ use of `a.y` occurs here } fn move_after_mut_borrow() { let mut a: Box<_> = box B { x: box 0, y: box 1 }; let _x = &mut a.x; - //~^ NOTE borrow of `a.x` occurs here + //~^ NOTE borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot move + //~^ move out of `a.y` occurs here } fn borrow_after_mut_borrow() { @@ -126,22 +129,25 @@ fn borrow_after_move_nested() { fn move_after_borrow_nested() { let a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 }; let _x = &a.x.x; - //~^ borrow of `a.x.x` occurs here + //~^ borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot move + //~^ move out of `a.y` occurs here } fn copy_after_mut_borrow_nested() { let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 }; let _x = &mut a.x.x; - //~^ NOTE borrow of `a.x.x` occurs here + //~^ NOTE mutable borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot use + //~^ use of `a.y` occurs here } fn move_after_mut_borrow_nested() { let mut a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 }; let _x = &mut a.x.x; - //~^ NOTE borrow of `a.x.x` occurs here + //~^ NOTE borrow of `a.y` occurs here let _y = a.y; //~ ERROR cannot move + //~^ move out of `a.y` occurs here } fn borrow_after_mut_borrow_nested() { |