rust/src/test/ui/integral-variable-unification-error.rs

9 lines
198 B
Rust
Raw Normal View History

fn main() {
let mut x = 2;
x = 5.0;
2015-01-12 00:01:44 -06:00
//~^ ERROR mismatched types
2016-07-28 11:49:31 -05:00
//~| expected type `{integer}`
//~| found type `{float}`
//~| expected integer, found floating-point number
}