Error code E0069

The compiler found a function whose body contains a return; statement but whose return type is not ().

Erroneous code example:

fn main() {
// error
fn foo() -> u8 {

Since return; is just like return ();, there is a mismatch between the function's return type and the value being returned.