1 error[E0308]: mismatched types
2 --> $DIR/unexpected-return-on-unit.rs:9:5
4 LL | foo() //~ ERROR mismatched types
5 | ^^^^^ expected (), found usize
7 = note: expected type `()`
9 help: try adding a semicolon
11 LL | foo(); //~ ERROR mismatched types
13 help: try adding a return type
15 LL | fn bar() -> usize {
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0308`.