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

/src/test/compile-fail/ret-non-nil.rs

http://github.com/jruderman/rust
Rust | 7 lines | 3 code | 3 blank | 1 comment | 0 complexity | e8e4fad35b02ff8cd4e61850e54a680c MD5 | raw file
1// error-pattern: `return;` in function returning non-nil
2
3fn f() { return; }
4
5fn g() -> int { return; }
6
7fn main() { f(); g(); }