518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
7 lines
110 B
Rust
7 lines
110 B
Rust
fn main() {
|
|
let x = [10, 20, 30];
|
|
let sum = 0;
|
|
for x in x { sum += x; }
|
|
assert (sum == 60);
|
|
}
|