File: issue-85222-types-containing-non-exhaustive-types.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,245,420 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (162 lines) | stat: -rw-r--r-- 7,045 bytes parent folder | download | duplicates (6)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:8:11
   |
LL |     match 0 {
   |           ^ pattern `usize::MAX..` not covered
   |
   = note: the matched value is of type `usize`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         1..=usize::MAX => (),
LL ~         usize::MAX.. => todo!(),
   |

error[E0004]: non-exhaustive patterns: `(usize::MAX.., _)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:14:11
   |
LL |     match (0usize, 0usize) {
   |           ^^^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
   |
   = note: the matched value is of type `(usize, usize)`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         (1..=usize::MAX, 1..=usize::MAX) => (),
LL ~         (usize::MAX.., _) => todo!(),
   |

error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:20:11
   |
LL |     match (0isize, 0usize) {
   |           ^^^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
   |
   = note: the matched value is of type `(isize, usize)`
   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
   |
LL ~         (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
LL ~         (..isize::MIN, _) | (isize::MAX.., _) => todo!(),
   |

error[E0004]: non-exhaustive patterns: `Some(_)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:27:11
   |
LL |     match Some(1usize) {
   |           ^^^^^^^^^^^^ pattern `Some(_)` not covered
   |
note: `Option<usize>` defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
  ::: $SRC_DIR/core/src/option.rs:LL:COL
   |
   = note: not covered
   = note: the matched value is of type `Option<usize>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         None => {},
LL +         Some(_) => todo!()
   |

error[E0004]: non-exhaustive patterns: `Some(usize::MAX..)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:32:11
   |
LL |     match Some(4) {
   |           ^^^^^^^ pattern `Some(usize::MAX..)` not covered
   |
note: `Option<usize>` defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
  ::: $SRC_DIR/core/src/option.rs:LL:COL
   |
   = note: not covered
   = note: the matched value is of type `Option<usize>`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         None => (),
LL ~         Some(usize::MAX..) => todo!(),
   |

error[E0004]: non-exhaustive patterns: `Some(Some(Some(usize::MAX..)))` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:39:11
   |
LL |     match Some(Some(Some(0))) {
   |           ^^^^^^^^^^^^^^^^^^^ pattern `Some(Some(Some(usize::MAX..)))` not covered
   |
note: `Option<Option<Option<usize>>>` defined here
  --> $SRC_DIR/core/src/option.rs:LL:COL
  ::: $SRC_DIR/core/src/option.rs:LL:COL
   |
   = note: not covered
   |
   = note: not covered
   |
   = note: not covered
   = note: the matched value is of type `Option<Option<Option<usize>>>`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         None => (),
LL ~         Some(Some(Some(usize::MAX..))) => todo!(),
   |

error[E0004]: non-exhaustive patterns: `A { a: usize::MAX.. }` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:48:11
   |
LL |     match (A { a: 0usize }) {
   |           ^^^^^^^^^^^^^^^^^ pattern `A { a: usize::MAX.. }` not covered
   |
note: `A<usize>` defined here
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:1:8
   |
LL | struct A<T> {
   |        ^
   = note: the matched value is of type `A<usize>`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         A { a: 1..=usize::MAX } => (),
LL ~         A { a: usize::MAX.. } => todo!(),
   |

error[E0004]: non-exhaustive patterns: `B(..isize::MIN, _)` and `B(isize::MAX.., _)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:54:11
   |
LL |     match B(0isize, 0usize) {
   |           ^^^^^^^^^^^^^^^^^ patterns `B(..isize::MIN, _)` and `B(isize::MAX.., _)` not covered
   |
note: `B<isize, usize>` defined here
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8
   |
LL | struct B<T, U>(T, U);
   |        ^
   = note: the matched value is of type `B<isize, usize>`
   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
   |
LL ~         B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
LL ~         B(..isize::MIN, _) | B(isize::MAX.., _) => todo!(),
   |

error[E0004]: non-exhaustive patterns: `B(_, usize::MAX..)` not covered
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:62:11
   |
LL |     match B(0isize, 0usize) {
   |           ^^^^^^^^^^^^^^^^^ pattern `B(_, usize::MAX..)` not covered
   |
note: `B<isize, usize>` defined here
  --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8
   |
LL | struct B<T, U>(T, U);
   |        ^
   = note: the matched value is of type `B<isize, usize>`
   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
LL ~         B(_, 1..=usize::MAX) => (),
LL ~         B(_, usize::MAX..) => todo!(),
   |

error: aborting due to 9 previous errors

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