]> git.proxmox.com Git - rustc.git/blob - src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / uninhabited / uninhabited-matches-feature-gated.stderr
1 error[E0004]: non-exhaustive patterns: `Err(_)` not covered
2 --> $DIR/uninhabited-matches-feature-gated.rs:6:19
3 |
4 LL | let _ = match x {
5 | ^ pattern `Err(_)` not covered
6 |
7 ::: $SRC_DIR/core/src/result.rs:LL:COL
8 |
9 LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
10 | --- not covered
11 |
12 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
13 = note: the matched value is of type `std::result::Result<u32, &Void>`
14
15 error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
16 --> $DIR/uninhabited-matches-feature-gated.rs:15:19
17 |
18 LL | enum Void {}
19 | ------------ `Void` defined here
20 ...
21 LL | let _ = match x {};
22 | ^
23 |
24 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
25 = note: the matched value is of type `&Void`
26
27 error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty
28 --> $DIR/uninhabited-matches-feature-gated.rs:18:19
29 |
30 LL | let _ = match x {};
31 | ^
32 |
33 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
34 = note: the matched value is of type `(Void,)`
35
36 error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty
37 --> $DIR/uninhabited-matches-feature-gated.rs:21:19
38 |
39 LL | let _ = match x {};
40 | ^
41 |
42 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
43 = note: the matched value is of type `[Void; 1]`
44
45 error[E0004]: non-exhaustive patterns: `&[_, ..]` not covered
46 --> $DIR/uninhabited-matches-feature-gated.rs:24:19
47 |
48 LL | let _ = match x {
49 | ^ pattern `&[_, ..]` not covered
50 |
51 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
52 = note: the matched value is of type `&[Void]`
53
54 error[E0004]: non-exhaustive patterns: `Err(_)` not covered
55 --> $DIR/uninhabited-matches-feature-gated.rs:32:19
56 |
57 LL | let _ = match x {
58 | ^ pattern `Err(_)` not covered
59 |
60 ::: $SRC_DIR/core/src/result.rs:LL:COL
61 |
62 LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
63 | --- not covered
64 |
65 = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
66 = note: the matched value is of type `std::result::Result<u32, Void>`
67
68 error[E0005]: refutable pattern in local binding: `Err(_)` not covered
69 --> $DIR/uninhabited-matches-feature-gated.rs:37:9
70 |
71 LL | let Ok(x) = x;
72 | ^^^^^ pattern `Err(_)` not covered
73 |
74 ::: $SRC_DIR/core/src/result.rs:LL:COL
75 |
76 LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
77 | --- not covered
78 |
79 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
80 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
81 = note: the matched value is of type `std::result::Result<u32, Void>`
82 help: you might want to use `if let` to ignore the variant that isn't matched
83 |
84 LL | if let Ok(x) = x { /* */ }
85 |
86
87 error: aborting due to 7 previous errors
88
89 Some errors have detailed explanations: E0004, E0005.
90 For more information about an error, try `rustc --explain E0004`.