We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Submitted from reddit. The following code works, and it shouldn't:
enum Foo { Bar(int) } fn main() { let bar = Bar(1); match bar { Bar(x) => { // shouldn't x be immutable? println!("x = {}" ,x); x += 1; println!("x = {}" ,x); } } }
This prints
x = 1 x = 2