rust/tests/ui/consts/const_in_pattern/incomplete-slice.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
621 B
Plaintext
Raw Normal View History

2023-09-26 02:39:41 -05:00
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
--> $DIR/incomplete-slice.rs:9:11
|
LL | match &[][..] {
2023-09-26 02:39:41 -05:00
| ^^^^^^^ patterns `&[]` and `&[_, _, ..]` not covered
|
= note: the matched value is of type `&[E]`
2023-09-26 02:39:41 -05:00
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
|
2023-02-27 11:43:39 -06:00
LL ~ E_SL => {},
2023-09-26 02:39:41 -05:00
LL + &[] | &[_, _, ..] => todo!()
|
2023-09-26 02:39:41 -05:00
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0004`.