rust/src/test/compile-fail/if-without-else-result.rs
Niko Matsakis 72a3667eb3 Allow tail expressions even in no_value blocks. Type checker
will guarantee they have unit type.
2012-01-03 13:13:52 -08:00

6 lines
129 B
Rust

// error-pattern:mismatched types: expected `()` but found `bool`
fn main() {
let a = if true { true };
log(debug, a);
}