about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-09-11 14:55:12 +0100
committervarkor <github@varkor.com>2018-12-11 11:18:55 +0000
commitffce4fbd6c7e1e2ac778cdb385cc9aca5e1bb6cb (patch)
tree8435952cb732c9c60cd987664e844b3a7c5b14d0 /src
parent88afbf2d99bd8720802b87d3cd8852b090063456 (diff)
downloadrust-ffce4fbd6c7e1e2ac778cdb385cc9aca5e1bb6cb.tar.gz
rust-ffce4fbd6c7e1e2ac778cdb385cc9aca5e1bb6cb.zip
Update uninhabited matches tests
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs4
-rw-r--r--src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr26
2 files changed, 3 insertions, 27 deletions
diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs
index 1d3f8ff12d8..a3b99deac23 100644
--- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs
+++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs
@@ -20,10 +20,10 @@ fn main() {
     let _ = match x {}; //~ ERROR non-exhaustive
 
     let x: (Void,) = unsafe { std::mem::uninitialized() };
-    let _ = match x {}; //~ ERROR non-exhaustive
+    let _ = match x {}; // okay
 
     let x: [Void; 1] = unsafe { std::mem::uninitialized() };
-    let _ = match x {}; //~ ERROR non-exhaustive
+    let _ = match x {}; // okay
 
     let x: &[Void] = unsafe { std::mem::uninitialized() };
     let _ = match x {   //~ ERROR non-exhaustive
diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
index f4974b8fa38..658ed9f4660 100644
--- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
+++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
@@ -16,30 +16,6 @@ help: ensure that all possible cases are being handled, possibly by adding wildc
 LL |     let _ = match x {}; //~ ERROR non-exhaustive
    |                   ^
 
-error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
-  --> $DIR/uninhabited-matches-feature-gated.rs:23:19
-   |
-LL |     let _ = match x {}; //~ ERROR non-exhaustive
-   |                   ^
-   |
-help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
-  --> $DIR/uninhabited-matches-feature-gated.rs:23:19
-   |
-LL |     let _ = match x {}; //~ ERROR non-exhaustive
-   |                   ^
-
-error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
-  --> $DIR/uninhabited-matches-feature-gated.rs:26:19
-   |
-LL |     let _ = match x {}; //~ ERROR non-exhaustive
-   |                   ^
-   |
-help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
-  --> $DIR/uninhabited-matches-feature-gated.rs:26:19
-   |
-LL |     let _ = match x {}; //~ ERROR non-exhaustive
-   |                   ^
-
 error[E0004]: non-exhaustive patterns: `&[_]` not covered
   --> $DIR/uninhabited-matches-feature-gated.rs:29:19
    |
@@ -58,7 +34,7 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered
 LL |     let Ok(x) = x;
    |         ^^^^^ pattern `Err(_)` not covered
 
-error: aborting due to 7 previous errors
+error: aborting due to 5 previous errors
 
 Some errors occurred: E0004, E0005.
 For more information about an error, try `rustc --explain E0004`.