diff options
| author | Michael Wright <mikerite@lavabit.com> | 2019-05-07 06:28:51 +0200 |
|---|---|---|
| committer | Michael Wright <mikerite@lavabit.com> | 2019-05-07 06:28:51 +0200 |
| commit | 87f7eaa2c8fa701a40ec2a592654f11e07aabe54 (patch) | |
| tree | fb845055d207dca95183301700df058c254e40bb | |
| parent | e9a3b7c4ee91b2b5713ffb16c6520e4cd7539ad2 (diff) | |
| download | rust-87f7eaa2c8fa701a40ec2a592654f11e07aabe54.tar.gz rust-87f7eaa2c8fa701a40ec2a592654f11e07aabe54.zip | |
Add test for #771.
Closes #771
| -rw-r--r-- | tests/ui/while_loop.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/while_loop.rs b/tests/ui/while_loop.rs index 005ce141d27..a8506553e92 100644 --- a/tests/ui/while_loop.rs +++ b/tests/ui/while_loop.rs @@ -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, + } + } +} |
