about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-11 22:21:05 +0200
committerGitHub <noreply@github.com>2020-05-11 22:21:05 +0200
commit400a9bae4919ea06b659d1089b0cf3c7e116cc1b (patch)
treebcc82e8753198d73b99a1ea5022b50eb12f3321b /src
parent6a8ac8b9752470ce2a807813ffa85c70305837ce (diff)
parent0aaff14ae38aa24729fe2fc056ce9fc79b5dda57 (diff)
downloadrust-400a9bae4919ea06b659d1089b0cf3c7e116cc1b.tar.gz
rust-400a9bae4919ea06b659d1089b0cf3c7e116cc1b.zip
Rollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC
Improve E0571 wording

r? @Dylan-DPC
Diffstat (limited to 'src')
-rw-r--r--src/librustc_error_codes/error_codes/E0571.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_error_codes/error_codes/E0571.md b/src/librustc_error_codes/error_codes/E0571.md
index c2a3a8d7588..eadae05aa30 100644
--- a/src/librustc_error_codes/error_codes/E0571.md
+++ b/src/librustc_error_codes/error_codes/E0571.md
@@ -7,7 +7,7 @@ Example of erroneous code:
 # fn satisfied(n: usize) -> bool { n % 23 == 0 }
 let result = while true {
     if satisfied(i) {
-        break 2*i; // error: `break` with value from a `while` loop
+        break 2 * i; // error: `break` with value from a `while` loop
     }
     i += 1;
 };
@@ -22,9 +22,9 @@ Make sure `break value;` statements only occur in `loop` loops:
 ```
 # let mut i = 1;
 # fn satisfied(n: usize) -> bool { n % 23 == 0 }
-let result = loop { // ok!
+let result = loop { // This is now a "loop" loop.
     if satisfied(i) {
-        break 2*i;
+        break 2 * i; // ok!
     }
     i += 1;
 };