error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:13:45 | LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } } | ^^^-^^ | | | | | help: consider removing this semicolon | expected i32, found () ... LL | test!(); | -------- in this macro invocation | = note: expected type `i32` found type `()` error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:16:23 | LL | fn no_return() -> i32 {} //~ ERROR mismatched types | ^^ expected i32, found () | = note: expected type `i32` found type `()` error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:18:23 | LL | fn bar(x: u32) -> u32 { //~ ERROR mismatched types | _______________________^ LL | | x * 2; | | - help: consider removing this semicolon LL | | } | |_^ expected u32, found () | = note: expected type `u32` found type `()` error[E0308]: mismatched types --> $DIR/liveness-return-last-stmt-semi.rs:22:23 | LL | fn baz(x: u64) -> u32 { //~ ERROR mismatched types | _______________________^ LL | | x * 2; LL | | } | |_^ expected u32, found () | = note: expected type `u32` found type `()` error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0308`.