You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
Nominating for a milestone, though I'm not really clear on which one. Well-defined? Feature complete? It's a backwards compatible change to the grammar, anyhow.
Fix two ICEs caused by ty.is_{sized,freeze}
Fixesrust-lang#6153
Properly fixesrust-lang#6139
The test case in rust-lang#6153 is kind of weird. Even removing one of the arguments of the `foo` function prevented the ICE. I think this test case is actually minimal.
changelog: none
The following example should parse and work correctly:
It does not parse now (
mut
in identifier position)The text was updated successfully, but these errors were encountered: