Skip to content

Commit

Permalink
slice_patterns: adjust error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Jan 18, 2020
1 parent c41443a commit 0aebb08
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/librustc_error_codes/error_codes/E0527.md
Expand Up @@ -17,8 +17,6 @@ Ensure that the pattern is consistent with the size of the matched
array. Additional elements can be matched with `..`:

```
#![feature(slice_patterns)]
let r = &[1, 2, 3, 4];
match r {
&[a, b, ..] => { // ok!
Expand Down
4 changes: 0 additions & 4 deletions src/librustc_error_codes/error_codes/E0528.md
Expand Up @@ -4,8 +4,6 @@ matched array.
Example of erroneous code:

```compile_fail,E0528
#![feature(slice_patterns)]
let r = &[1, 2];
match r {
&[a, b, c, rest @ ..] => { // error: pattern requires at least 3
Expand All @@ -19,8 +17,6 @@ Ensure that the matched array has at least as many elements as the pattern
requires. You can match an arbitrary number of remaining elements with `..`:

```
#![feature(slice_patterns)]
let r = &[1, 2, 3, 4, 5];
match r {
&[a, b, c, rest @ ..] => { // ok!
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_error_codes/error_codes/E0730.md
Expand Up @@ -18,8 +18,6 @@ Ensure that the pattern is consistent with the size of the matched
array. Additional elements can be matched with `..`:

```
#![feature(slice_patterns)]
let r = &[1, 2, 3, 4];
match r {
&[a, b, ..] => { // ok!
Expand Down

0 comments on commit 0aebb08

Please sign in to comment.