2014-01-11 22:29:46 +01:00
|
|
|
// regression test for #8005
|
|
|
|
|
2015-03-03 10:42:26 +02:00
|
|
|
macro_rules! test { () => { fn foo() -> i32 { 1; } } }
|
2016-10-26 02:28:20 +03:00
|
|
|
//~^ ERROR mismatched types
|
2014-01-11 22:29:46 +01:00
|
|
|
|
2016-10-26 02:28:20 +03:00
|
|
|
fn no_return() -> i32 {} //~ ERROR mismatched types
|
2014-01-11 22:29:46 +01:00
|
|
|
|
2016-10-26 02:28:20 +03:00
|
|
|
fn bar(x: u32) -> u32 { //~ ERROR mismatched types
|
2017-12-10 23:29:24 +03:00
|
|
|
x * 2;
|
2014-01-11 22:29:46 +01:00
|
|
|
}
|
|
|
|
|
2016-10-26 02:28:20 +03:00
|
|
|
fn baz(x: u64) -> u32 { //~ ERROR mismatched types
|
2014-01-11 22:29:46 +01:00
|
|
|
x * 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test!();
|
|
|
|
}
|