error[E0308]: mismatched types
--> $DIR/unexpected-return-on-unit.rs:9:5
|
-LL | foo() //~ ERROR mismatched types
+LL | foo()
| ^^^^^ expected (), found usize
|
- = note: expected type `()`
- found type `usize`
help: try adding a semicolon
|
-LL | foo(); //~ ERROR mismatched types
+LL | foo();
| ^
help: try adding a return type
|