]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0029
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Nov 2019 12:14:10 +0000 (13:14 +0100)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Fri, 15 Nov 2019 12:24:47 +0000 (13:24 +0100)
src/librustc_error_codes/error_codes/E0029.md

index fadfda0a80c18052bac2ee2baf685ebad44ce662..d12d85b9b4c993e80acf14e9ce72ba16111c93aa 100644 (file)
@@ -1,8 +1,6 @@
-In a match expression, only numbers and characters can be matched against a
-range. This is because the compiler checks that the range is non-empty at
-compile-time, and is unable to evaluate arbitrary comparison functions. If you
-want to capture values of an orderable type between two end-points, you can use
-a guard.
+Something other than numbers and characters has been used for a range.
+
+Erroneous code example:
 
 ```compile_fail,E0029
 let string = "salutations !";
@@ -20,3 +18,9 @@ match string {
     _ => {}
 }
 ```
+
+In a match expression, only numbers and characters can be matched against a
+range. This is because the compiler checks that the range is non-empty at
+compile-time, and is unable to evaluate arbitrary comparison functions. If you
+want to capture values of an orderable type between two end-points, you can use
+a guard.