2011-09-12 14:24:12 +02:00
|
|
|
// error-pattern:invalidate reference x
|
2011-06-08 22:48:19 +02:00
|
|
|
|
|
|
|
fn main() {
|
2011-09-13 12:31:16 +02:00
|
|
|
let v: [mutable {mutable x: int}] = [mutable {mutable x: 1}];
|
|
|
|
for x in v { v[0] = {mutable x: 2}; log x; }
|
2011-08-15 21:54:52 -07:00
|
|
|
}
|