982a1a4783
Update docs to reflect new approach to aliases
9 lines
223 B
Rust
9 lines
223 B
Rust
// error-pattern:mutable reference to a variable that roots another reference
|
|
|
|
fn f(a: {mutable x: int}, &b: {mutable x: int}) -> int {
|
|
b.x += 1;
|
|
ret a.x + b.x;
|
|
}
|
|
|
|
fn main() { let i = {mutable x: 4}; log f(i, i); }
|