about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-15 13:21:50 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-15 13:24:47 +0100
commit041c9f6f48ee5f145d268b324d4be83013fb6754 (patch)
tree64bf7de2669bbd6a0727442e1b85e4827d8b376c /src/librustc_error_codes/error_codes
parent1a3c8c8964ec44c81fee69fbe25cbd8910909284 (diff)
downloadrust-041c9f6f48ee5f145d268b324d4be83013fb6754.tar.gz
rust-041c9f6f48ee5f145d268b324d4be83013fb6754.zip
Clean up E0054
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0054.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/librustc_error_codes/error_codes/E0054.md b/src/librustc_error_codes/error_codes/E0054.md
index af71cb44462..c3eb375fbcc 100644
--- a/src/librustc_error_codes/error_codes/E0054.md
+++ b/src/librustc_error_codes/error_codes/E0054.md
@@ -1,5 +1,6 @@
-It is not allowed to cast to a bool. If you are trying to cast a numeric type
-to a bool, you can compare it with zero instead:
+It is not allowed to cast to a bool.
+
+Erroneous code example:
 
 ```compile_fail,E0054
 let x = 5;
@@ -8,6 +9,9 @@ let x = 5;
 let x_is_nonzero = x as bool;
 ```
 
+If you are trying to cast a numeric type to a bool, you can compare it with
+zero instead:
+
 ```
 let x = 5;