diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-15 13:14:10 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-11-15 13:24:47 +0100 |
| commit | f8d575a0073300cd9cc3f204bc3c21b86eb5ec18 (patch) | |
| tree | 51e90c0e2082a92f8361e02288f48fd1b4df156d | |
| parent | 86506281b5520e38eef772c78d614ae4ba3c0f7e (diff) | |
| download | rust-f8d575a0073300cd9cc3f204bc3c21b86eb5ec18.tar.gz rust-f8d575a0073300cd9cc3f204bc3c21b86eb5ec18.zip | |
Clean up E0029
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0029.md | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/librustc_error_codes/error_codes/E0029.md b/src/librustc_error_codes/error_codes/E0029.md index fadfda0a80c..d12d85b9b4c 100644 --- a/src/librustc_error_codes/error_codes/E0029.md +++ b/src/librustc_error_codes/error_codes/E0029.md @@ -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. |
