From ffce4fbd6c7e1e2ac778cdb385cc9aca5e1bb6cb Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 11 Sep 2018 14:55:12 +0100 Subject: [PATCH] Update uninhabited matches tests --- .../uninhabited-matches-feature-gated.rs | 4 +-- .../uninhabited-matches-feature-gated.stderr | 26 +------------------ 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`.