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