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
use std;
fn main() {
let a = {mutable foo: [mutable 1u]};
vec::iteri(a.foo) {|i, v|
#error("%u = %u", i, v);
}
}
The error produced is: "m.rs:5:19: 7:2 error: argument 1 may alias with argument 0, which is not immutably rooted", which is more than a little jargon-y. If this is really an error, then it should be easier to understand what the problem is. Note that this program compiles cleanly:
use std;
fn main() {
let a = {mutable foo: [mutable 1u]};
let f = a.foo; // add a temp
vec::iteri(f) {|i, v|
#error("%u = %u", i, v);
}
}