]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0069.md
Rollup merge of #66576 - pnkfelix:more-robust-gdb-vec-printer, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0069.md
1 The compiler found a function whose body contains a `return;` statement but
2 whose return type is not `()`. An example of this is:
3
4 ```compile_fail,E0069
5 // error
6 fn foo() -> u8 {
7     return;
8 }
9 ```
10
11 Since `return;` is just like `return ();`, there is a mismatch between the
12 function's return type and the value being returned.