]> git.lizzy.rs Git - rust.git/blob - src/test/ui/liveness/liveness-return-last-stmt-semi.rs
Permit `#[deprecated]` in stdlib
[rust.git] / src / test / ui / liveness / liveness-return-last-stmt-semi.rs
1 //
2 // regression test for #8005
3
4 macro_rules! test { () => { fn foo() -> i32 { 1; } } }
5                                            //~^ ERROR mismatched types
6
7 fn no_return() -> i32 {} //~ ERROR mismatched types
8
9 fn bar(x: u32) -> u32 { //~ ERROR mismatched types
10     x * 2;
11 }
12
13 fn baz(x: u64) -> u32 { //~ ERROR mismatched types
14     x * 2;
15 }
16
17 fn main() {
18     test!();
19 }