diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.rs b/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.rs deleted file mode 100644 index 33d6af303..000000000 --- a/src/test/ui/borrowck/borrowck-loan-blocks-mut-uniq.rs +++ /dev/null @@ -1,18 +0,0 @@ -fn borrow<F>(v: &isize, f: F) where F: FnOnce(&isize) { - f(v); -} - - - -fn box_imm() { - let mut v: Box<_> = Box::new(3); - borrow(&*v, - |w| { //~ ERROR cannot borrow `v` as mutable - v = Box::new(4); - assert_eq!(*v, 3); - assert_eq!(*w, 4); - }) -} - -fn main() { -} |