It is used in the case where a variable-length slice pattern is used to match on an array of known size. This allows considering only those entries in the array that are captured by one of the patterns. As a side-effect, diagnostics improve a bit for those cases.
20 lines
699 B
Plaintext
20 lines
699 B
Plaintext
error[E0004]: non-exhaustive patterns: `&[..]` not covered
|
|
--> $DIR/match-byte-array-patterns-2.rs:4:11
|
|
|
|
|
LL | match buf {
|
|
| ^^^ pattern `&[..]` not covered
|
|
|
|
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
|
|
|
error[E0004]: non-exhaustive patterns: `&[..]` not covered
|
|
--> $DIR/match-byte-array-patterns-2.rs:10:11
|
|
|
|
|
LL | match buf {
|
|
| ^^^ pattern `&[..]` not covered
|
|
|
|
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0004`.
|