fix tests

This commit is contained in:
Jorge Aparicio 2015-01-05 16:02:07 -05:00
parent ec11f66dbf
commit a55011e788
2 changed files with 3 additions and 3 deletions

View file

@ -14,6 +14,6 @@ use std::ops::FnMut;
pub fn main() {
let mut f = |&mut: x: int, y: int| -> int { x + y };
let z = f(1u, 2); //~ ERROR type mismatch
let z = f(1u, 2); //~ ERROR mismatched types
println!("{}", z);
}

View file

@ -11,11 +11,11 @@
// Tests calls to closure arguments where the closure takes 0 arguments.
// This is a bit tricky due to rust-call ABI.
fn foo(f: &mut FnMut()) -> int {
fn foo(f: &mut FnMut() -> int) -> int {
f()
}
fn main() {
let z = foo(|| 22);
let z = foo(&mut || 22);
assert_eq!(z, 22);
}