PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/jruderman/rust
Rust | 10 lines | 7 code | 3 blank | 0 comment | 1 complexity | 69bcc6405e0cf7aa5c81c222a7a59daf MD5 | raw file
 1
 2
 3fn test_fn() {
 4    type t = extern fn() -> int;
 5    fn ten() -> int { return 10; }
 6    let rs: t = { ten };
 7    assert (rs() == 10);
 8}
 9
10fn main() { test_fn(); }