summary refs log tree commit diff
path: root/src/test/ui/pattern/usefulness/non-exhaustive-match.stderr
blob: 1ca0a33bf37d90e03c7804d2fe53f4c067de86f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
error[E0004]: non-exhaustive patterns: `A` not covered
  --> $DIR/non-exhaustive-match.rs:7:11
   |
LL | enum T { A, B }
   | ---------------
   | |        |
   | |        not covered
   | `T` defined here
...
LL |     match x { T::B => { } }
   |           ^ pattern `A` 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 `T`

error[E0004]: non-exhaustive patterns: `false` not covered
  --> $DIR/non-exhaustive-match.rs:8:11
   |
LL |     match true {
   |           ^^^^ pattern `false` 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 `bool`

error[E0004]: non-exhaustive patterns: `Some(_)` not covered
  --> $DIR/non-exhaustive-match.rs:11:11
   |
LL |     match Some(10) {
   |           ^^^^^^^^ pattern `Some(_)` not covered
   |
  ::: $SRC_DIR/core/src/option.rs:LL:COL
   |
LL |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
   |     ---- 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 `Option<i32>`

error[E0004]: non-exhaustive patterns: `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered
  --> $DIR/non-exhaustive-match.rs:14:11
   |
LL |     match (2, 3, 4) {
   |           ^^^^^^^^^ patterns `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` 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 `(i32, i32, i32)`

error[E0004]: non-exhaustive patterns: `(A, A)` and `(B, B)` not covered
  --> $DIR/non-exhaustive-match.rs:18:11
   |
LL |     match (T::A, T::A) {
   |           ^^^^^^^^^^^^ patterns `(A, A)` and `(B, B)` 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 `(T, T)`

error[E0004]: non-exhaustive patterns: `B` not covered
  --> $DIR/non-exhaustive-match.rs:22:11
   |
LL | enum T { A, B }
   | ---------------
   | |           |
   | |           not covered
   | `T` defined here
...
LL |     match T::A {
   |           ^^^^ pattern `B` 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 `T`

error[E0004]: non-exhaustive patterns: `[]` not covered
  --> $DIR/non-exhaustive-match.rs:33:11
   |
LL |     match *vec {
   |           ^^^^ 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 `[Option<isize>]`

error[E0004]: non-exhaustive patterns: `[_, _, _, _, ..]` not covered
  --> $DIR/non-exhaustive-match.rs:46:11
   |
LL |     match *vec {
   |           ^^^^ 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 `[f32]`

error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0004`.