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