rust/tests/ui/issues/issue-13359.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
249 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`
}