fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

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