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

15 lines
135 B
Rust
Raw Normal View History

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