Add test for #771.

Closes #771
This commit is contained in:
Michael Wright 2019-05-07 06:28:51 +02:00
parent e9a3b7c4ee
commit 87f7eaa2c8

View File

@ -238,3 +238,18 @@ fn issue3670() {
let _ = elem.or_else(|| *iter.next()?);
}
}
fn issue771() {
let mut a = 100;
let b = Some(true);
loop {
if a > 10 {
break;
}
match b {
Some(_) => a = 0,
None => break,
}
}
}