]> git.lizzy.rs Git - rust.git/blob - tests/ui/checked_unwrap.stderr
Adapt the *.stderr files of the ui-tests to the tool_lints
[rust.git] / tests / ui / checked_unwrap.stderr
1 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
2  --> $DIR/checked_unwrap.rs:9:9
3   |
4 8 |     if x.is_some() {
5   |        ----------- the check is happening here
6 9 |         x.unwrap(); // unnecessary
7   |         ^^^^^^^^^^
8   |
9 note: lint level defined here
10  --> $DIR/checked_unwrap.rs:3:35
11   |
12 3 | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: This call to `unwrap()` will always panic.
16   --> $DIR/checked_unwrap.rs:11:9
17    |
18 8  |     if x.is_some() {
19    |        ----------- because of this check
20 ...
21 11 |         x.unwrap(); // will panic
22    |         ^^^^^^^^^^
23    |
24 note: lint level defined here
25   --> $DIR/checked_unwrap.rs:3:9
26    |
27 3  | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28    |         ^^^^^^^^^^^^^^^^^^^^^^^^
29
30 error: This call to `unwrap()` will always panic.
31   --> $DIR/checked_unwrap.rs:14:9
32    |
33 13 |     if x.is_none() {
34    |        ----------- because of this check
35 14 |         x.unwrap(); // will panic
36    |         ^^^^^^^^^^
37
38 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
39   --> $DIR/checked_unwrap.rs:16:9
40    |
41 13 |     if x.is_none() {
42    |        ----------- the check is happening here
43 ...
44 16 |         x.unwrap(); // unnecessary
45    |         ^^^^^^^^^^
46
47 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
48   --> $DIR/checked_unwrap.rs:20:9
49    |
50 19 |     if x.is_ok() {
51    |        --------- the check is happening here
52 20 |         x.unwrap(); // unnecessary
53    |         ^^^^^^^^^^
54
55 error: This call to `unwrap_err()` will always panic.
56   --> $DIR/checked_unwrap.rs:21:9
57    |
58 19 |     if x.is_ok() {
59    |        --------- because of this check
60 20 |         x.unwrap(); // unnecessary
61 21 |         x.unwrap_err(); // will panic
62    |         ^^^^^^^^^^^^^^
63
64 error: This call to `unwrap()` will always panic.
65   --> $DIR/checked_unwrap.rs:23:9
66    |
67 19 |     if x.is_ok() {
68    |        --------- because of this check
69 ...
70 23 |         x.unwrap(); // will panic
71    |         ^^^^^^^^^^
72
73 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
74   --> $DIR/checked_unwrap.rs:24:9
75    |
76 19 |     if x.is_ok() {
77    |        --------- the check is happening here
78 ...
79 24 |         x.unwrap_err(); // unnecessary
80    |         ^^^^^^^^^^^^^^
81
82 error: This call to `unwrap()` will always panic.
83   --> $DIR/checked_unwrap.rs:27:9
84    |
85 26 |     if x.is_err() {
86    |        ---------- because of this check
87 27 |         x.unwrap(); // will panic
88    |         ^^^^^^^^^^
89
90 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
91   --> $DIR/checked_unwrap.rs:28:9
92    |
93 26 |     if x.is_err() {
94    |        ---------- the check is happening here
95 27 |         x.unwrap(); // will panic
96 28 |         x.unwrap_err(); // unnecessary
97    |         ^^^^^^^^^^^^^^
98
99 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
100   --> $DIR/checked_unwrap.rs:30:9
101    |
102 26 |     if x.is_err() {
103    |        ---------- the check is happening here
104 ...
105 30 |         x.unwrap(); // unnecessary
106    |         ^^^^^^^^^^
107
108 error: This call to `unwrap_err()` will always panic.
109   --> $DIR/checked_unwrap.rs:31:9
110    |
111 26 |     if x.is_err() {
112    |        ---------- because of this check
113 ...
114 31 |         x.unwrap_err(); // will panic
115    |         ^^^^^^^^^^^^^^
116
117 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
118   --> $DIR/checked_unwrap.rs:48:9
119    |
120 47 |     if x.is_ok() && y.is_err() {
121    |        --------- the check is happening here
122 48 |         x.unwrap(); // unnecessary
123    |         ^^^^^^^^^^
124
125 error: This call to `unwrap_err()` will always panic.
126   --> $DIR/checked_unwrap.rs:49:9
127    |
128 47 |     if x.is_ok() && y.is_err() {
129    |        --------- because of this check
130 48 |         x.unwrap(); // unnecessary
131 49 |         x.unwrap_err(); // will panic
132    |         ^^^^^^^^^^^^^^
133
134 error: This call to `unwrap()` will always panic.
135   --> $DIR/checked_unwrap.rs:50:9
136    |
137 47 |     if x.is_ok() && y.is_err() {
138    |                     ---------- because of this check
139 ...
140 50 |         y.unwrap(); // will panic
141    |         ^^^^^^^^^^
142
143 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
144   --> $DIR/checked_unwrap.rs:51:9
145    |
146 47 |     if x.is_ok() && y.is_err() {
147    |                     ---------- the check is happening here
148 ...
149 51 |         y.unwrap_err(); // unnecessary
150    |         ^^^^^^^^^^^^^^
151
152 error: This call to `unwrap()` will always panic.
153   --> $DIR/checked_unwrap.rs:65:9
154    |
155 60 |     if x.is_ok() || y.is_ok() {
156    |        --------- because of this check
157 ...
158 65 |         x.unwrap(); // will panic
159    |         ^^^^^^^^^^
160
161 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
162   --> $DIR/checked_unwrap.rs:66:9
163    |
164 60 |     if x.is_ok() || y.is_ok() {
165    |        --------- the check is happening here
166 ...
167 66 |         x.unwrap_err(); // unnecessary
168    |         ^^^^^^^^^^^^^^
169
170 error: This call to `unwrap()` will always panic.
171   --> $DIR/checked_unwrap.rs:67:9
172    |
173 60 |     if x.is_ok() || y.is_ok() {
174    |                     --------- because of this check
175 ...
176 67 |         y.unwrap(); // will panic
177    |         ^^^^^^^^^^
178
179 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
180   --> $DIR/checked_unwrap.rs:68:9
181    |
182 60 |     if x.is_ok() || y.is_ok() {
183    |                     --------- the check is happening here
184 ...
185 68 |         y.unwrap_err(); // unnecessary
186    |         ^^^^^^^^^^^^^^
187
188 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
189   --> $DIR/checked_unwrap.rs:72:9
190    |
191 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
192    |        --------- the check is happening here
193 72 |         x.unwrap(); // unnecessary
194    |         ^^^^^^^^^^
195
196 error: This call to `unwrap_err()` will always panic.
197   --> $DIR/checked_unwrap.rs:73:9
198    |
199 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
200    |        --------- because of this check
201 72 |         x.unwrap(); // unnecessary
202 73 |         x.unwrap_err(); // will panic
203    |         ^^^^^^^^^^^^^^
204
205 error: This call to `unwrap()` will always panic.
206   --> $DIR/checked_unwrap.rs:74:9
207    |
208 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
209    |                       --------- because of this check
210 ...
211 74 |         y.unwrap(); // will panic
212    |         ^^^^^^^^^^
213
214 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
215   --> $DIR/checked_unwrap.rs:75:9
216    |
217 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
218    |                       --------- the check is happening here
219 ...
220 75 |         y.unwrap_err(); // unnecessary
221    |         ^^^^^^^^^^^^^^
222
223 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
224   --> $DIR/checked_unwrap.rs:76:9
225    |
226 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
227    |                                    ---------- the check is happening here
228 ...
229 76 |         z.unwrap(); // unnecessary
230    |         ^^^^^^^^^^
231
232 error: This call to `unwrap_err()` will always panic.
233   --> $DIR/checked_unwrap.rs:77:9
234    |
235 71 |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
236    |                                    ---------- because of this check
237 ...
238 77 |         z.unwrap_err(); // will panic
239    |         ^^^^^^^^^^^^^^
240
241 error: This call to `unwrap()` will always panic.
242   --> $DIR/checked_unwrap.rs:85:9
243    |
244 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
245    |        --------- because of this check
246 ...
247 85 |         x.unwrap(); // will panic
248    |         ^^^^^^^^^^
249
250 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
251   --> $DIR/checked_unwrap.rs:86:9
252    |
253 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
254    |        --------- the check is happening here
255 ...
256 86 |         x.unwrap_err(); // unnecessary
257    |         ^^^^^^^^^^^^^^
258
259 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
260   --> $DIR/checked_unwrap.rs:87:9
261    |
262 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
263    |                       --------- the check is happening here
264 ...
265 87 |         y.unwrap(); // unnecessary
266    |         ^^^^^^^^^^
267
268 error: This call to `unwrap_err()` will always panic.
269   --> $DIR/checked_unwrap.rs:88:9
270    |
271 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
272    |                       --------- because of this check
273 ...
274 88 |         y.unwrap_err(); // will panic
275    |         ^^^^^^^^^^^^^^
276
277 error: This call to `unwrap()` will always panic.
278   --> $DIR/checked_unwrap.rs:89:9
279    |
280 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
281    |                                    ---------- because of this check
282 ...
283 89 |         z.unwrap(); // will panic
284    |         ^^^^^^^^^^
285
286 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
287   --> $DIR/checked_unwrap.rs:90:9
288    |
289 79 |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
290    |                                    ---------- the check is happening here
291 ...
292 90 |         z.unwrap_err(); // unnecessary
293    |         ^^^^^^^^^^^^^^
294
295 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
296   --> $DIR/checked_unwrap.rs:98:13
297    |
298 97 |         if x.is_some() {
299    |            ----------- the check is happening here
300 98 |             x.unwrap(); // unnecessary
301    |             ^^^^^^^^^^
302
303 error: This call to `unwrap()` will always panic.
304    --> $DIR/checked_unwrap.rs:100:13
305     |
306 97  |         if x.is_some() {
307     |            ----------- because of this check
308 ...
309 100 |             x.unwrap(); // will panic
310     |             ^^^^^^^^^^
311
312 error: aborting due to 34 previous errors
313