mirror of https://github.com/rust-lang/rust.git
Add test for if without else cannot return result
This commit is contained in:
parent
413d97f8bd
commit
9375204461
|
@ -0,0 +1,6 @@
|
|||
// error-pattern:`if` without `else` can not produce a result
|
||||
|
||||
fn main() {
|
||||
let a = if true { true };
|
||||
log a;
|
||||
}
|
Loading…
Reference in New Issue