rust/src/test/ui/integral-variable-unification-error.rs
Yuning Zhang 710dcbd381 Improve type mismatch error messages
Replace "integral variable" with "integer" and replace
"floating-point variable" with "floating-point number" to make the
message less confusing.
2018-12-31 20:43:08 -05:00

9 lines
198 B
Rust

fn main() {
let mut x = 2;
x = 5.0;
//~^ ERROR mismatched types
//~| expected type `{integer}`
//~| found type `{float}`
//~| expected integer, found floating-point number
}