Closed
Description
The following example should parse and work correctly:
fn swap(f: &fn(~[int]) -> ~[int]) -> ~[int] {
let x = ~[1, 2, 3];
f(x)
}
fn main() {
let v = swap(|mut x| { x.push(4); x });
let w = do swap |mut x| { x.push(4); x };
assert_eq!(v, w);
}
It does not parse now (mut
in identifier position)