diff options
| author | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-04 15:34:38 -0700 |
|---|---|---|
| committer | Brian Koropoff <bkoropoff@gmail.com> | 2014-10-05 00:26:06 -0700 |
| commit | 16b27bbeadff1c61ce36e09180b18aedc7ec27b2 (patch) | |
| tree | 56403d05154c9a5766d6d1e9fef102e3951f84b6 | |
| parent | f74b1c4ee255ab7cd2706896bced45f14e1ccc1a (diff) | |
| download | rust-16b27bbeadff1c61ce36e09180b18aedc7ec27b2.tar.gz rust-16b27bbeadff1c61ce36e09180b18aedc7ec27b2.zip | |
Fix unit test that was illegally mutating an upvar
| -rw-r--r-- | src/test/run-pass/unboxed-closures-by-ref.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/run-pass/unboxed-closures-by-ref.rs b/src/test/run-pass/unboxed-closures-by-ref.rs index 2ee28d19b75..70d41a5c689 100644 --- a/src/test/run-pass/unboxed-closures-by-ref.rs +++ b/src/test/run-pass/unboxed-closures-by-ref.rs @@ -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); } |
