mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
14 lines
249 B
Rust
14 lines
249 B
Rust
fn foo(_s: i16) { }
|
|
|
|
fn bar(_s: u32) { }
|
|
|
|
fn main() {
|
|
foo(1*(1 as isize));
|
|
//~^ ERROR mismatched types
|
|
//~| expected `i16`, found `isize`
|
|
|
|
bar(1*(1 as usize));
|
|
//~^ ERROR mismatched types
|
|
//~| expected `u32`, found `usize`
|
|
}
|