fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
2.5 KiB65 linesraw
1error[E0004]: non-exhaustive patterns: `Err(_)` not covered
2  --> $DIR/uninhabited-matches-feature-gated.rs:7:19
3   |
4LL |     let _ = match x {
5   |                   ^ pattern `Err(_)` not covered
6   |
7   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
8
9error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
10  --> $DIR/uninhabited-matches-feature-gated.rs:12:19
11   |
12LL |     let _ = match x {};
13   |                   ^
14   |
15   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
16
17error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
18  --> $DIR/uninhabited-matches-feature-gated.rs:15:19
19   |
20LL |     let _ = match x {};
21   |                   ^
22   |
23   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
24
25error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
26  --> $DIR/uninhabited-matches-feature-gated.rs:18:19
27   |
28LL |     let _ = match x {};
29   |                   ^
30   |
31   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
32
33error[E0004]: non-exhaustive patterns: `&[_]` not covered
34  --> $DIR/uninhabited-matches-feature-gated.rs:21:19
35   |
36LL |     let _ = match x {
37   |                   ^ pattern `&[_]` not covered
38   |
39   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
40
41error[E0004]: non-exhaustive patterns: `Err(_)` not covered
42  --> $DIR/uninhabited-matches-feature-gated.rs:29:19
43   |
44LL |     let _ = match x {
45   |                   ^ pattern `Err(_)` not covered
46   |
47   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
48
49error[E0005]: refutable pattern in local binding: `Err(_)` not covered
50  --> $DIR/uninhabited-matches-feature-gated.rs:34:9
51   |
52LL |     let Ok(x) = x;
53   |         ^^^^^ pattern `Err(_)` not covered
54   |
55   = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
56   = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
57help: you might want to use `if let` to ignore the variant that isn't matched
58   |
59LL |     if let Ok(x) = x { /* */ }
60   |
61
62error: aborting due to 7 previous errors
63
64Some errors have detailed explanations: E0004, E0005.
65For more information about an error, try `rustc --explain E0004`.