rust/src/test/ui/issues/issue-13359.rs

14 lines
241 B
Rust
Raw Normal View History

fn foo(_s: i16) { }
fn bar(_s: u32) { }
fn main() {
foo(1*(1 as isize));
2015-01-12 06:01:44 +00:00
//~^ ERROR mismatched types
//~| expected i16, found isize
bar(1*(1 as usize));
2015-01-12 06:01:44 +00:00
//~^ ERROR mismatched types
//~| expected u32, found usize
}