diff options
| author | P1start <rewi-github@whanau.org> | 2014-12-03 22:47:53 +1300 |
|---|---|---|
| committer | P1start <rewi-github@whanau.org> | 2014-12-04 13:47:35 +1300 |
| commit | 108bca53f04342a4626b34ac1d5b8236d170a12a (patch) | |
| tree | aae9d6fe5650fbe061c011e6f77e8d386627cb69 /src/test/compile-fail/removed-syntax-fixed-vec.rs | |
| parent | 3a325c666d2cb7e297bf3057ff2442f96a79428b (diff) | |
| download | rust-108bca53f04342a4626b34ac1d5b8236d170a12a.tar.gz rust-108bca53f04342a4626b34ac1d5b8236d170a12a.zip | |
Make the parser’s ‘expected <foo>, found <bar>’ errors more accurate
As an example of what this changes, the following code:
let x: [int ..4];
Currently spits out ‘expected `]`, found `..`’. However, a comma would also be
valid there, as would a number of other tokens. This change adjusts the parser
to produce more accurate errors, so that that example now produces ‘expected one
of `(`, `+`, `,`, `::`, or `]`, found `..`’.
Diffstat (limited to 'src/test/compile-fail/removed-syntax-fixed-vec.rs')
| -rw-r--r-- | src/test/compile-fail/removed-syntax-fixed-vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/compile-fail/removed-syntax-fixed-vec.rs b/src/test/compile-fail/removed-syntax-fixed-vec.rs index 917b4e03ad0..fe49d1f4a8d 100644 --- a/src/test/compile-fail/removed-syntax-fixed-vec.rs +++ b/src/test/compile-fail/removed-syntax-fixed-vec.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -type v = [int * 3]; //~ ERROR expected `]`, found `*` +type v = [int * 3]; //~ ERROR expected one of `(`, `+`, `,`, `::`, or `]`, found `*` |
