summary refs log tree commit diff
path: root/src/test/compile-fail/forgot-ret.rs
blob: 4e422c970c6853c08c2eaa4071d6f554318cd303 (plain)
1
2
3
4
5
6
7
8
// -*- rust -*-
// error-pattern: not all control paths return a value

fn god_exists(a: int) -> bool { be god_exists(a); }

fn f(a: int) -> int { if god_exists(a) { ret 5; }; }

fn main() { f(12); }