]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0069.md
New upstream version 1.41.1+dfsg1
[rustc.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 `()`.
3
4 Erroneous code example:
5
6 ```compile_fail,E0069
7 // error
8 fn foo() -> u8 {
9 return;
10 }
11 ```
12
13 Since `return;` is just like `return ();`, there is a mismatch between the
14 function's return type and the value being returned.