rust/src/test/run-pass/autobind.rs
Marijn Haverbeke fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00

10 lines
210 B
Rust

fn f<@T>(x: [T]) -> T { ret x[0]; }
fn g(act: fn([int]) -> int) -> int { ret act([1, 2, 3]); }
fn main() {
assert (g(f) == 1);
let f1: fn([str]) -> str = f;
assert (f1(["x", "y", "z"]) == "x");
}