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