rust/src/test/run-pass/expr-block-fn.rs

11 lines
160 B
Rust

fn test_fn() {
type t = native fn() -> int;
fn ten() -> int { ret 10; }
let rs: t = { ten };
assert (rs() == 10);
}
fn main() { test_fn(); }