Update uninhabited matches tests

This commit is contained in:
varkor 2018-09-11 14:55:12 +01:00
parent 88afbf2d99
commit ffce4fbd6c
2 changed files with 3 additions and 27 deletions

View File

@ -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

View File

@ -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`.