Closed
Description
The following code:
enum thing { thing(int) }
impl thing {
fn baz(&x: int) { x = 5 }
}
fn main() {}
fails to compile with the error:
nubs/method-mutable-ref.rs:3:22: 3:23 error: assigning to argument
nubs/method-mutable-ref.rs:3 fn baz(&x: int) { x = 5 }
which is complete nonsense, since it is a mutable argument. This is because a bug in the parser code that handles explicit self types causes the '&' to get dropped.