rust/tests/ui/expr/if/if-without-else-result.rs

7 lines
164 B
Rust
Raw Normal View History

fn main() {
let a = if true { true };
2020-01-04 18:17:46 -06:00
//~^ ERROR `if` may be missing an `else` clause [E0317]
//~| expected `bool`, found `()`
2014-10-14 20:07:11 -05:00
println!("{}", a);
}