Closed
Description
The following example:
fn foo(v: Vec<u32>) {
v.push(4);
}
fn main() {
foo(vec![1, 2, 3]);
}
generates the following error:
mut.rs:2:5: 2:6 error: cannot borrow immutable local variable `v` as mutable
mut.rs:2 v.push(4);
^
A few month ago, it used to say "argument" instead of "local variable".
I already found the code that does this, still need to figure out how to fix it, give me a few days :-)