2023-09-26 09:39:41 +02:00
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
2022-08-07 19:12:33 +02:00
--> $DIR/incomplete-slice.rs:9:11
|
LL | match &[][..] {
2023-09-26 09:39:41 +02:00
| ^^^^^^^ patterns `&[]` and `&[_, _, ..]` not covered
2024-11-07 19:34:23 +00:00
LL |
LL | E_SL => {}
| ---- this pattern doesn't introduce a new catch-all binding, but rather pattern matches against the value of constant `E_SL`
2022-08-07 19:12:33 +02:00
|
= note: the matched value is of type `&[E]`
2024-11-07 19:34:23 +00:00
note: constant `E_SL` defined here
--> $DIR/incomplete-slice.rs:6:1
|
LL | const E_SL: &[E] = &[E::A];
| ^^^^^^^^^^^^^^^^
help: if you meant to introduce a binding, use a different name
|
LL | E_SL_var => {}
| ++++
2023-09-26 09:39:41 +02: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
2022-08-07 19:12:33 +02:00
|
2023-02-27 17:43:39 +00:00
LL ~ E_SL => {},
2023-09-26 09:39:41 +02:00
LL + &[] | &[_, _, ..] => todo!()
2022-08-07 19:12:33 +02:00
|
2023-09-26 09:39:41 +02:00
error: aborting due to 1 previous error
2022-08-07 19:12:33 +02:00
For more information about this error, try `rustc --explain E0004`.