diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs')
-rw-r--r-- | src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs b/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs deleted file mode 100644 index 46e0da5be..000000000 --- a/src/test/ui/pattern/usefulness/slice-patterns-exhaustiveness.rs +++ /dev/null @@ -1,129 +0,0 @@ -fn main() { - let s: &[bool] = &[true; 0]; - let s1: &[bool; 1] = &[false; 1]; - let s2: &[bool; 2] = &[false; 2]; - let s3: &[bool; 3] = &[false; 3]; - let s10: &[bool; 10] = &[false; 10]; - - match s2 { - //~^ ERROR `&[false, _]` not covered - [true, .., true] => {} - } - match s3 { - //~^ ERROR `&[false, ..]` not covered - [true, .., true] => {} - } - match s10 { - //~^ ERROR `&[false, ..]` not covered - [true, .., true] => {} - } - - match s1 { - [true, ..] => {} - [.., false] => {} - } - match s2 { - //~^ ERROR `&[false, true]` not covered - [true, ..] => {} - [.., false] => {} - } - match s3 { - //~^ ERROR `&[false, .., true]` not covered - [true, ..] => {} - [.., false] => {} - } - match s { - //~^ ERROR `&[false, .., true]` not covered - [] => {} - [true, ..] => {} - [.., false] => {} - } - - match s { - //~^ ERROR `&[_, ..]` not covered - [] => {} - } - match s { - //~^ ERROR `&[_, _, ..]` not covered - [] => {} - [_] => {} - } - match s { - //~^ ERROR `&[false, ..]` not covered - [] => {} - [true, ..] => {} - } - match s { - //~^ ERROR `&[false, _, ..]` not covered - [] => {} - [_] => {} - [true, ..] => {} - } - match s { - //~^ ERROR `&[_, .., false]` not covered - [] => {} - [_] => {} - [.., true] => {} - } - - match s { - //~^ ERROR `&[_, _, .., true]` not covered - [] => {} - [_] => {} - [_, _] => {} - [.., false] => {} - } - match s { - //~^ ERROR `&[true, _, .., _]` not covered - [] => {} - [_] => {} - [_, _] => {} - [false, .., false] => {} - } - - const CONST: &[bool] = &[true]; - match s { - //~^ ERROR `&[]` and `&[_, _, ..]` not covered - &[true] => {} - } - match s { - //~^ ERROR `&[]` and `&[_, _, ..]` not covered - CONST => {} - } - match s { - //~^ ERROR `&[]` and `&[_, _, ..]` not covered - CONST => {} - &[false] => {} - } - match s { - //~^ ERROR `&[]` and `&[_, _, ..]` not covered - &[false] => {} - CONST => {} - } - match s { - //~^ ERROR `&[_, _, ..]` not covered - &[] => {} - CONST => {} - } - match s { - //~^ ERROR `&[false]` not covered - &[] => {} - CONST => {} - &[_, _, ..] => {} - } - match s { - [] => {} - [false] => {} - CONST => {} - [_, _, ..] => {} - } - const CONST1: &[bool; 1] = &[true]; - match s1 { - //~^ ERROR `&[false]` not covered - CONST1 => {} - } - match s1 { - CONST1 => {} - [false] => {} - } -} |