diff options
Diffstat (limited to 'tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr')
-rw-r--r-- | tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr index fb6ecda3c..a8786d024 100644 --- a/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr +++ b/tests/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr @@ -89,10 +89,24 @@ LL ~ [] => {}, LL + &[_, ..] => todo!() | -error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered +error[E0004]: non-exhaustive patterns: `&[]` and `&[_, ..]` not covered --> $DIR/slice-patterns-exhaustiveness.rs:46:11 | LL | match s { + | ^ patterns `&[]` and `&[_, ..]` not covered + | + = note: the matched value is of type `&[bool]` + = note: match arms with guards don't count towards exhaustivity +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 + | +LL ~ [..] if false => {}, +LL + &[] | &[_, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:50:11 + | +LL | match s { | ^ pattern `&[_, _, ..]` not covered | = note: the matched value is of type `&[bool]` @@ -103,7 +117,7 @@ LL + &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:51:11 + --> $DIR/slice-patterns-exhaustiveness.rs:55:11 | LL | match s { | ^ pattern `&[false, ..]` not covered @@ -116,7 +130,7 @@ LL + &[false, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[false, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:56:11 + --> $DIR/slice-patterns-exhaustiveness.rs:60:11 | LL | match s { | ^ pattern `&[false, _, ..]` not covered @@ -129,7 +143,7 @@ LL + &[false, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[_, .., false]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:62:11 + --> $DIR/slice-patterns-exhaustiveness.rs:66:11 | LL | match s { | ^ pattern `&[_, .., false]` not covered @@ -142,7 +156,7 @@ LL + &[_, .., false] => todo!() | error[E0004]: non-exhaustive patterns: `&[_, _, .., true]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:69:11 + --> $DIR/slice-patterns-exhaustiveness.rs:73:11 | LL | match s { | ^ pattern `&[_, _, .., true]` not covered @@ -155,7 +169,7 @@ LL + &[_, _, .., true] => todo!() | error[E0004]: non-exhaustive patterns: `&[true, _, .., _]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:76:11 + --> $DIR/slice-patterns-exhaustiveness.rs:80:11 | LL | match s { | ^ pattern `&[true, _, .., _]` not covered @@ -168,7 +182,7 @@ LL + &[true, _, .., _] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:85:11 + --> $DIR/slice-patterns-exhaustiveness.rs:89:11 | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered @@ -181,7 +195,7 @@ LL + &[] | &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:89:11 + --> $DIR/slice-patterns-exhaustiveness.rs:93:11 | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered @@ -194,7 +208,7 @@ LL + &[] | &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:93:11 + --> $DIR/slice-patterns-exhaustiveness.rs:97:11 | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered @@ -207,7 +221,7 @@ LL + &[] | &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:98:11 + --> $DIR/slice-patterns-exhaustiveness.rs:102:11 | LL | match s { | ^ patterns `&[]` and `&[_, _, ..]` not covered @@ -220,7 +234,7 @@ LL + &[] | &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:103:11 + --> $DIR/slice-patterns-exhaustiveness.rs:107:11 | LL | match s { | ^ pattern `&[_, _, ..]` not covered @@ -233,7 +247,7 @@ LL + &[_, _, ..] => todo!() | error[E0004]: non-exhaustive patterns: `&[false]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:108:11 + --> $DIR/slice-patterns-exhaustiveness.rs:112:11 | LL | match s { | ^ pattern `&[false]` not covered @@ -246,7 +260,7 @@ LL + &[false] => todo!() | error[E0004]: non-exhaustive patterns: `&[false]` not covered - --> $DIR/slice-patterns-exhaustiveness.rs:121:11 + --> $DIR/slice-patterns-exhaustiveness.rs:125:11 | LL | match s1 { | ^^ pattern `&[false]` not covered @@ -258,6 +272,6 @@ LL ~ CONST1 => {}, LL + &[false] => todo!() | -error: aborting due to 20 previous errors +error: aborting due to 21 previous errors For more information about this error, try `rustc --explain E0004`. |