/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
- fn test_fn() {
- type t = extern fn() -> int;
- fn ten() -> int { return 10; }
- let rs: t = { ten };
- assert (rs() == 10);
- }
- fn main() { test_fn(); }