rust/tests/ui/return/ret-non-nil.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
137 B
Rust
Raw Normal View History

2012-08-01 17:30:05 -07:00
fn f() { return; }
fn g() -> isize { return; } //~ ERROR `return;` in a function whose return type is not `()`
fn main() { f(); g(); }