summaryrefslogtreecommitdiffstats
path: root/src/test/ui/liveness/liveness-return-last-stmt-semi.rs
blob: e8909c4a5ae9b0e518a9989a17ec89f8df6a1a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//
// regression test for #8005

macro_rules! test { () => { fn foo() -> i32 { 1; } } }
                                           //~^ ERROR mismatched types

fn no_return() -> i32 {} //~ ERROR mismatched types

fn bar(x: u32) -> u32 { //~ ERROR mismatched types
    x * 2;
}

fn baz(x: u64) -> u32 { //~ ERROR mismatched types
    x * 2;
}

fn main() {
    test!();
}