518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
12 lines
183 B
Rust
12 lines
183 B
Rust
|
|
|
|
|
|
// -*- rust -*-
|
|
fn my_err(s: str) -> ! { log_err s; fail; }
|
|
|
|
fn okay(i: uint) -> int {
|
|
if i == 3u { my_err("I don't like three"); } else { ret 42; }
|
|
}
|
|
|
|
fn main() { okay(4u); }
|