rust/src/test/ui/issues/issue-4201.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

12 lines
213 B
Rust

fn main() {
let a = if true {
0
} else if false {
//~^ ERROR if may be missing an else clause
//~| expected type `()`
//~| found type `{integer}`
//~| expected (), found integer
1
};
}