rust/src/test/compile-fail/if-without-else-result.rs

6 lines
125 B
Rust
Raw Normal View History

// error-pattern:`if` without `else` can not produce a result
fn main() {
let a = if true { true };
log(debug, a);
}