blob: 167b15fbaeec403c65107c87219d6668e4504e22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// xfail-stage00
obj foo(@mutable int x) {
drop {
log "running dtor";
*x = ((*x) + 1);
}
}
fn main() {
auto mbox = @mutable 10;
{
auto x = foo(mbox);
}
check ((*mbox) == 11);
}
|