error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:13:28 | 13 | fn plus_one(x: i32) -> i32 { | ____________________________^ 14 | | x + 1; 15 | | } | |_^ expected i32, found () | = note: expected type `i32` found type `()` help: consider removing this semicolon: --> $DIR/coercion-missing-tail-expected-type.rs:14:10 | 14 | x + 1; | ^ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:17:29 | 17 | fn foo() -> Result { | _____________________________^ 18 | | Ok(1); 19 | | } | |_^ expected enum `std::result::Result`, found () | = note: expected type `std::result::Result` found type `()` help: consider removing this semicolon: --> $DIR/coercion-missing-tail-expected-type.rs:18:10 | 18 | Ok(1); | ^ error: aborting due to previous error(s)