rust/src/test/compile-fail/ret-non-nil.rs
2012-08-01 19:16:06 -07:00

8 lines
130 B
Rust

// error-pattern: `return;` in function returning non-nil
fn f() { return; }
fn g() -> int { return; }
fn main() { f(); g(); }