rust/src/test/compile-fail/block-must-not-have-result-for.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

7 lines
118 B
Rust

// error-pattern:mismatched types: expected `()` but found `bool`
fn main() {
for i in [0] {
true
}
}