diff options
Diffstat (limited to 'tests/ui/typeck/issue-114529-illegal-break-with-value.rs')
-rw-r--r-- | tests/ui/typeck/issue-114529-illegal-break-with-value.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-114529-illegal-break-with-value.rs b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs index 613d1b634..353a935e3 100644 --- a/tests/ui/typeck/issue-114529-illegal-break-with-value.rs +++ b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs @@ -17,4 +17,10 @@ fn main() { }; 51 }]; + + while true { + break (|| { //~ ERROR `break` with value from a `while` loop + let local = 9; + }); + } } |