This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
12 lines
139 B
Rust
12 lines
139 B
Rust
|
|
|
|
|
|
// -*- rust -*-
|
|
fn f() -> int { ret 42; }
|
|
|
|
fn main() {
|
|
let g: fn() -> int = bind f();
|
|
let i: int = g();
|
|
assert (i == 42);
|
|
}
|