Closed
Description
Given the following code (playground):
fn f() -> f32 {
3
5.0
}
fn main() {
}
The current output is:
error: expected `;`, found `5.0`
--> epp.rs:2:6
|
2 | 3
| ^ help: add `;` here
3 | 5.0
| --- unexpected token
error[E0308]: mismatched types
--> epp.rs:2:5
|
2 | 3
| ^ expected `()`, found integer
What is this second error trying to tell me? What did it expect to be unit type and why? Does it make sense for this error to be emitted despite the first error correctly identifying my problem?