Fix unit test that was illegally mutating an upvar

This commit is contained in:
Brian Koropoff 2014-10-04 15:34:38 -07:00
parent f74b1c4ee2
commit 16b27bbead

View file

@ -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);
}