]> git.lizzy.rs Git - rust.git/commitdiff
slice_patterns: adjust error codes
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 29 Dec 2019 23:31:35 +0000 (00:31 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sat, 18 Jan 2020 16:59:44 +0000 (17:59 +0100)
src/librustc_error_codes/error_codes/E0527.md
src/librustc_error_codes/error_codes/E0528.md
src/librustc_error_codes/error_codes/E0730.md

index 4bff39dc770e0ec4c30ec45b7ff4d1703e2c3f18..97ea31269388142df9853a62c3aa8b756aa86e1c 100644 (file)
@@ -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!
index 4b6ea2469919cd61b28b650e5e1e6c2782e66cb3..54c2c4d4e9d0f765eb1d1450e1f7cc381ed9a569 100644 (file)
@@ -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
@@ -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!
index 803a25148651c6753c860be20694c4f5eb80a2a0..bf1f72be3258926bd7f107935517027cbda26f8a 100644 (file)
@@ -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!