diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-22 16:58:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-22 16:58:26 +0200 |
| commit | 02eb002ee37a75e3998841f1de64a0a115256800 (patch) | |
| tree | ffb1b092e9fef8f661b06cbb98932a0f3f39724b | |
| parent | 53d0046983228f8f0df77ff6a05ba9bb227e8e33 (diff) | |
| parent | 985ebf2c4acce62e9dedf8ffb6ca95789add19e8 (diff) | |
| download | rust-02eb002ee37a75e3998841f1de64a0a115256800.tar.gz rust-02eb002ee37a75e3998841f1de64a0a115256800.zip | |
Rollup merge of #72235 - GuillaumeGomez:cleanup-E0590, r=Dylan-DPC
Clean up E0590 explanation r? @Dylan-DPC
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0590.md | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0590.md b/src/librustc_error_codes/error_codes/E0590.md index df7aa4f0a1e..11005b8336f 100644 --- a/src/librustc_error_codes/error_codes/E0590.md +++ b/src/librustc_error_codes/error_codes/E0590.md @@ -1,13 +1,17 @@ -`break` or `continue` must include a label when used in the condition of a -`while` loop. +`break` or `continue` keywords were used in a condition of a `while` loop +without a label. -Example of erroneous code: +Erroneous code code: ```compile_fail,E0590 while break {} ``` +`break` or `continue` must include a label when used in the condition of a +`while` loop. + To fix this, add a label specifying which loop is being broken out of: + ``` 'foo: while break 'foo {} ``` |
