blob: ec1e5c01ffb7b4c506fde3abe6067ae72fabefd2 (
plain)
1
2
3
4
5
6
7
8
|
// error-pattern:invalidate reference x
fn whoknows(x: @mutable {mutable x: int}) { x.x = 10; }
fn main() {
let box = @mutable {mutable x: 1};
alt *box { x { whoknows(box); log(error, x); } }
}
|