rust/tests/ui/numeric/numeric-cast-2.rs
2023-01-11 09:32:08 +00:00

12 lines
208 B
Rust

fn foo() -> i32 {
4
}
fn main() {
let x: u16 = foo();
//~^ ERROR mismatched types
let y: i64 = x + x;
//~^ ERROR mismatched types
let z: i32 = x + x;
//~^ ERROR mismatched types
}