]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0590.md
Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0590.md
1 `break` or `continue` keywords were used in a condition of a `while` loop
2 without a label.
3
4 Erroneous code code:
5
6 ```compile_fail,E0590
7 while break {}
8 ```
9
10 `break` or `continue` must include a label when used in the condition of a
11 `while` loop.
12
13 To fix this, add a label specifying which loop is being broken out of:
14
15 ```
16 'foo: while break 'foo {}
17 ```