summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0590.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0590.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0590.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0590.md b/compiler/rustc_error_codes/src/error_codes/E0590.md
new file mode 100644
index 000000000..11005b833
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0590.md
@@ -0,0 +1,17 @@
+`break` or `continue` keywords were used in a condition of a `while` loop
+without a label.
+
+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 {}
+```