about summary refs log tree commit diff
path: root/src/test/ui/match
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2020-11-19 19:52:54 +0000
committerNadrieril <nadrieril+git@gmail.com>2020-11-19 19:52:54 +0000
commit82bf5b61cd8e03e463f7877d7b3a801c8ba60f13 (patch)
treee03113548c2cb2a802c23d3865c673b214eae5b7 /src/test/ui/match
parent3d3c8c5e0d534cdd794f1b3359089eba031d492c (diff)
Regroup many usefulness-related test in the same folder
Diffstat (limited to 'src/test/ui/match')
-rw-r--r--src/test/ui/match/issue-50900.rs19
-rw-r--r--src/test/ui/match/issue-50900.stderr15
-rw-r--r--src/test/ui/match/type_polymorphic_byte_str_literals.rs36
-rw-r--r--src/test/ui/match/type_polymorphic_byte_str_literals.stderr21
4 files changed, 0 insertions, 91 deletions
diff --git a/src/test/ui/match/issue-50900.rs b/src/test/ui/match/issue-50900.rs
deleted file mode 100644
index 27135af9575..00000000000
--- a/src/test/ui/match/issue-50900.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#[derive(PartialEq, Eq)]
-pub struct Tag(pub Context, pub u16);
-
-#[derive(PartialEq, Eq)]
-pub enum Context {
-    Tiff,
-    Exif,
-}
-
-impl Tag {
-    const ExifIFDPointer: Tag = Tag(Context::Tiff, 34665);
-}
-
-fn main() {
-    match Tag::ExifIFDPointer {
-    //~^ ERROR: non-exhaustive patterns: `Tag(Exif, _)` not covered
-        Tag::ExifIFDPointer => {}
-    }
-}
diff --git a/src/test/ui/match/issue-50900.stderr b/src/test/ui/match/issue-50900.stderr
deleted file mode 100644
index d378b6e8efe..00000000000
--- a/src/test/ui/match/issue-50900.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0004]: non-exhaustive patterns: `Tag(Exif, _)` not covered
-  --> $DIR/issue-50900.rs:15:11
-   |
-LL | pub struct Tag(pub Context, pub u16);
-   | ------------------------------------- `Tag` defined here
-...
-LL |     match Tag::ExifIFDPointer {
-   |           ^^^^^^^^^^^^^^^^^^^ pattern `Tag(Exif, _)` not covered
-   |
-   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
-   = note: the matched value is of type `Tag`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0004`.
diff --git a/src/test/ui/match/type_polymorphic_byte_str_literals.rs b/src/test/ui/match/type_polymorphic_byte_str_literals.rs
deleted file mode 100644
index cb44c1da76b..00000000000
--- a/src/test/ui/match/type_polymorphic_byte_str_literals.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-#[deny(unreachable_patterns)]
-
-fn parse_data1(data: &[u8]) -> u32 {
-    match data {
-        b"" => 1,
-        _ => 2,
-    }
-}
-
-fn parse_data2(data: &[u8]) -> u32 {
-    match data { //~ ERROR non-exhaustive patterns: `&[_, ..]` not covered
-        b"" => 1,
-    }
-}
-
-fn parse_data3(data: &[u8; 0]) -> u8 {
-    match data {
-        b"" => 1,
-    }
-}
-
-fn parse_data4(data: &[u8]) -> u8 {
-    match data { //~ ERROR non-exhaustive patterns
-        b"aaa" => 0,
-        [_, _, _] => 1,
-    }
-}
-
-fn parse_data5(data: &[u8; 3]) -> u8 {
-    match data {
-        b"aaa" => 0,
-        [_, _, _] => 1,
-    }
-}
-
-fn main() {}
diff --git a/src/test/ui/match/type_polymorphic_byte_str_literals.stderr b/src/test/ui/match/type_polymorphic_byte_str_literals.stderr
deleted file mode 100644
index 6ce53a4f21e..00000000000
--- a/src/test/ui/match/type_polymorphic_byte_str_literals.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
-  --> $DIR/type_polymorphic_byte_str_literals.rs:11:11
-   |
-LL |     match data {
-   |           ^^^^ pattern `&[_, ..]` not covered
-   |
-   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
-   = note: the matched value is of type `&[u8]`
-
-error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
-  --> $DIR/type_polymorphic_byte_str_literals.rs:23:11
-   |
-LL |     match data {
-   |           ^^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
-   |
-   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
-   = note: the matched value is of type `&[u8]`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0004`.