]> git.lizzy.rs Git - rust.git/blob - src/test/ui/block-result/unexpected-return-on-unit.stderr
3eae3e7542241df7a11caec4dcba448de66b55b8
[rust.git] / src / test / ui / block-result / unexpected-return-on-unit.stderr
1 error[E0308]: mismatched types
2   --> $DIR/unexpected-return-on-unit.rs:9:5
3    |
4 LL |     foo()
5    |     ^^^^^ expected (), found usize
6    |
7    = note: expected unit type `()`
8                    found type `usize`
9 help: try adding a semicolon
10    |
11 LL |     foo();
12    |          ^
13 help: try adding a return type
14    |
15 LL | fn bar() -> usize {
16    |          ^^^^^^^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0308`.