rust/tests/ui/numeric/numeric-cast-2.rs

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

12 lines
208 B
Rust
Raw Normal View History

2018-01-07 05:10:51 +00:00
fn foo() -> i32 {
4
}
fn main() {
let x: u16 = foo();
//~^ ERROR mismatched types
let y: i64 = x + x;
2018-01-07 20:27:03 +00:00
//~^ ERROR mismatched types
2018-01-07 05:10:51 +00:00
let z: i32 = x + x;
2018-01-07 20:27:03 +00:00
//~^ ERROR mismatched types
2018-01-07 05:10:51 +00:00
}