rust/src/librustc_error_codes/error_codes/E0069.md
2019-11-25 15:39:07 +01:00

328 B

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

Erroneous code example:

// error
fn foo() -> u8 {
    return;
}

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