| error[E0308]: mismatched types |
| --> $DIR/coercion-missing-tail-expected-type.rs:13:28 |
| | |
| LL | fn plus_one(x: i32) -> i32 { //~ ERROR mismatched types |
| | ____________________________^ |
| LL | | x + 1; |
| | | - help: consider removing this semicolon |
| LL | | } |
| | |_^ expected i32, found () |
| | |
| = note: expected type `i32` |
| found type `()` |
| |
| error[E0308]: mismatched types |
| --> $DIR/coercion-missing-tail-expected-type.rs:17:29 |
| | |
| LL | fn foo() -> Result<u8, u64> { //~ ERROR mismatched types |
| | _____________________________^ |
| LL | | Ok(1); |
| | | - help: consider removing this semicolon |
| LL | | } |
| | |_^ expected enum `std::result::Result`, found () |
| | |
| = note: expected type `std::result::Result<u8, u64>` |
| found type `()` |
| |
| error: aborting due to 2 previous errors |
| |
| For more information about this error, try `rustc --explain E0308`. |