518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
11 lines
202 B
Rust
11 lines
202 B
Rust
fn main() {
|
|
let u = {x: 10, y: @{a: 20}};
|
|
let {x: x, y: @{a: a}} = u;
|
|
x = 100;
|
|
a = 100;
|
|
assert (x == 100);
|
|
assert (a == 100);
|
|
assert (u.x == 10);
|
|
assert (u.y.a == 20);
|
|
}
|