2011-08-02 04:44:00 -05:00
|
|
|
fn main() {
|
|
|
|
let u = {x: 10, y: @{a: 20}};
|
2011-08-19 17:16:48 -05:00
|
|
|
let {x: x, y: @{a: a}} = u;
|
2011-08-02 04:44:00 -05:00
|
|
|
x = 100;
|
|
|
|
a = 100;
|
2011-08-19 17:16:48 -05:00
|
|
|
assert (x == 100);
|
|
|
|
assert (a == 100);
|
|
|
|
assert (u.x == 10);
|
|
|
|
assert (u.y.a == 20);
|
2011-08-02 04:44:00 -05:00
|
|
|
}
|