Skip to content

Commit

Permalink
Fix unit test that was illegally mutating an upvar
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoropoff committed Oct 5, 2014
1 parent f74b1c4 commit 16b27bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/run-pass/unboxed-closures-by-ref.rs
Expand Up @@ -28,8 +28,8 @@ fn main() {
let mut x = 0u;
let y = 2u;

call_fn(|&:| x += y);
call_fn(|&:| assert_eq!(x, 0));
call_fn_mut(|&mut:| x += y);
call_fn_once(|:| x += y);
assert_eq!(x, y * 3);
assert_eq!(x, y * 2);
}

0 comments on commit 16b27bb

Please sign in to comment.