error[E0004]: non-exhaustive patterns: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:7:19
+ --> $DIR/uninhabited-matches-feature-gated.rs:6:19
|
LL | let _ = match x {
| ^ pattern `Err(_)` not covered
+ |
+ ::: $SRC_DIR/libcore/result.rs:LL:COL
+ |
+LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+ | --- 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 `std::result::Result<u32, &Void>`
error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:12:19
+ --> $DIR/uninhabited-matches-feature-gated.rs:15:19
|
+LL | enum Void {}
+ | ------------ `Void` defined here
+...
LL | let _ = match x {};
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+ = note: the matched value is of type `&Void`
error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:15:19
+ --> $DIR/uninhabited-matches-feature-gated.rs:18:19
|
LL | let _ = match x {};
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+ = note: the matched value is of type `(Void,)`
error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
- --> $DIR/uninhabited-matches-feature-gated.rs:18:19
+ --> $DIR/uninhabited-matches-feature-gated.rs:21:19
|
LL | let _ = match x {};
| ^
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
+ = note: the matched value is of type `[Void; 1]`
-error[E0004]: non-exhaustive patterns: `&[_]` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:21:19
+error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
+ --> $DIR/uninhabited-matches-feature-gated.rs:24:19
|
LL | let _ = match x {
- | ^ pattern `&[_]` not covered
+ | ^ 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 `&[Void]`
error[E0004]: non-exhaustive patterns: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:29:19
+ --> $DIR/uninhabited-matches-feature-gated.rs:32:19
|
LL | let _ = match x {
| ^ pattern `Err(_)` not covered
+ |
+ ::: $SRC_DIR/libcore/result.rs:LL:COL
+ |
+LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+ | --- 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 `std::result::Result<u32, Void>`
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
- --> $DIR/uninhabited-matches-feature-gated.rs:34:9
+ --> $DIR/uninhabited-matches-feature-gated.rs:37:9
|
LL | let Ok(x) = x;
| ^^^^^ pattern `Err(_)` not covered
+ |
+ ::: $SRC_DIR/libcore/result.rs:LL:COL
+ |
+LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
+ | --- not covered
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
+ = note: the matched value is of type `std::result::Result<u32, Void>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
LL | if let Ok(x) = x { /* */ }