From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../slice-patterns-exhaustiveness.stderr | 263 +++++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr (limited to 'src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr') diff --git a/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr b/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr new file mode 100644 index 000000000..5d1e170ae --- /dev/null +++ b/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.stderr @@ -0,0 +1,263 @@ +error[E0004]: non-exhaustive patterns: `&[false, _]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:8:11 + | +LL | match s2 { + | ^^ pattern `&[false, _]` not covered + | + = note: the matched value is of type `&[bool; 2]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [true, .., true] => {} +LL + &[false, _] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:12:11 + | +LL | match s3 { + | ^^ pattern `&[false, ..]` not covered + | + = note: the matched value is of type `&[bool; 3]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [true, .., true] => {} +LL + &[false, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:16:11 + | +LL | match s10 { + | ^^^ pattern `&[false, ..]` not covered + | + = note: the matched value is of type `&[bool; 10]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [true, .., true] => {} +LL + &[false, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, true]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:25:11 + | +LL | match s2 { + | ^^ pattern `&[false, true]` not covered + | + = note: the matched value is of type `&[bool; 2]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [.., false] => {} +LL + &[false, true] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:30:11 + | +LL | match s3 { + | ^^ pattern `&[false, .., true]` not covered + | + = note: the matched value is of type `&[bool; 3]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [.., false] => {} +LL + &[false, .., true] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, .., true]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:35:11 + | +LL | match s { + | ^ pattern `&[false, .., true]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [.., false] => {} +LL + &[false, .., true] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:42:11 + | +LL | match s { + | ^ pattern `&[_, ..]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [] => {} +LL + &[_, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:46:11 + | +LL | match s { + | ^ pattern `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [_] => {} +LL + &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:51:11 + | +LL | match s { + | ^ pattern `&[false, ..]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [true, ..] => {} +LL + &[false, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:56:11 + | +LL | match s { + | ^ pattern `&[false, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [true, ..] => {} +LL + &[false, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, .., false]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:62:11 + | +LL | match s { + | ^ pattern `&[_, .., false]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [.., true] => {} +LL + &[_, .., false] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, _, .., true]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:69:11 + | +LL | match s { + | ^ pattern `&[_, _, .., true]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [.., false] => {} +LL + &[_, _, .., true] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[true, _, .., _]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:76:11 + | +LL | match s { + | ^ pattern `&[true, _, .., _]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ [false, .., false] => {} +LL + &[true, _, .., _] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:85:11 + | +LL | match s { + | ^ patterns `&[]` and `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +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 ~ &[true] => {} +LL + &[] | &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:89:11 + | +LL | match s { + | ^ patterns `&[]` and `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +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 ~ CONST => {} +LL + &[] | &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:93:11 + | +LL | match s { + | ^ patterns `&[]` and `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +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 ~ &[false] => {} +LL + &[] | &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:98:11 + | +LL | match s { + | ^ patterns `&[]` and `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +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 ~ CONST => {} +LL + &[] | &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:103:11 + | +LL | match s { + | ^ pattern `&[_, _, ..]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ CONST => {} +LL + &[_, _, ..] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:108:11 + | +LL | match s { + | ^ pattern `&[false]` not covered + | + = note: the matched value is of type `&[bool]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ &[_, _, ..] => {} +LL + &[false] => todo!() + | + +error[E0004]: non-exhaustive patterns: `&[false]` not covered + --> $DIR/slice-patterns-exhaustiveness.rs:121:11 + | +LL | match s1 { + | ^^ pattern `&[false]` not covered + | + = note: the matched value is of type `&[bool; 1]` +help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown + | +LL ~ CONST1 => {} +LL + &[false] => todo!() + | + +error: aborting due to 20 previous errors + +For more information about this error, try `rustc --explain E0004`. -- cgit v1.2.3