]> git.lizzy.rs Git - rust.git/blob - tests/ui/liveness/liveness-return-last-stmt-semi.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / liveness / liveness-return-last-stmt-semi.rs
1 // regression test for #8005
2
3 macro_rules! test { () => { fn foo() -> i32 { 1; } } }
4                                            //~^ ERROR mismatched types
5
6 fn no_return() -> i32 {} //~ ERROR mismatched types
7
8 fn bar(x: u32) -> u32 { //~ ERROR mismatched types
9     x * 2;
10 }
11
12 fn baz(x: u64) -> u32 { //~ ERROR mismatched types
13     x * 2;
14 }
15
16 fn main() {
17     test!();
18 }