]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/checked_unwrap/complex_conditionals.stderr
Rollup merge of #102533 - notriddle:notriddle/a-source, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / checked_unwrap / complex_conditionals.stderr
1 error: called `unwrap` on `x` after checking its variant with `is_ok`
2   --> $DIR/complex_conditionals.rs:8:9
3    |
4 LL |     if x.is_ok() && y.is_err() {
5    |        --------- the check is happening here
6 LL |         x.unwrap(); // unnecessary
7    |         ^^^^^^^^^^
8    |
9    = help: try using `if let` or `match`
10 note: the lint level is defined here
11   --> $DIR/complex_conditionals.rs:1:35
12    |
13 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
14    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16 error: this call to `unwrap_err()` will always panic
17   --> $DIR/complex_conditionals.rs:9:9
18    |
19 LL |     if x.is_ok() && y.is_err() {
20    |        --------- because of this check
21 LL |         x.unwrap(); // unnecessary
22 LL |         x.unwrap_err(); // will panic
23    |         ^^^^^^^^^^^^^^
24    |
25 note: the lint level is defined here
26   --> $DIR/complex_conditionals.rs:1:9
27    |
28 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
29    |         ^^^^^^^^^^^^^^^^^^^^^^^^
30
31 error: this call to `unwrap()` will always panic
32   --> $DIR/complex_conditionals.rs:10:9
33    |
34 LL |     if x.is_ok() && y.is_err() {
35    |                     ---------- because of this check
36 ...
37 LL |         y.unwrap(); // will panic
38    |         ^^^^^^^^^^
39
40 error: called `unwrap_err` on `y` after checking its variant with `is_err`
41   --> $DIR/complex_conditionals.rs:11:9
42    |
43 LL |     if x.is_ok() && y.is_err() {
44    |                     ---------- the check is happening here
45 ...
46 LL |         y.unwrap_err(); // unnecessary
47    |         ^^^^^^^^^^^^^^
48    |
49    = help: try using `if let` or `match`
50
51 error: this call to `unwrap()` will always panic
52   --> $DIR/complex_conditionals.rs:25:9
53    |
54 LL |     if x.is_ok() || y.is_ok() {
55    |        --------- because of this check
56 ...
57 LL |         x.unwrap(); // will panic
58    |         ^^^^^^^^^^
59
60 error: called `unwrap_err` on `x` after checking its variant with `is_ok`
61   --> $DIR/complex_conditionals.rs:26:9
62    |
63 LL |     if x.is_ok() || y.is_ok() {
64    |        --------- the check is happening here
65 ...
66 LL |         x.unwrap_err(); // unnecessary
67    |         ^^^^^^^^^^^^^^
68    |
69    = help: try using `if let` or `match`
70
71 error: this call to `unwrap()` will always panic
72   --> $DIR/complex_conditionals.rs:27:9
73    |
74 LL |     if x.is_ok() || y.is_ok() {
75    |                     --------- because of this check
76 ...
77 LL |         y.unwrap(); // will panic
78    |         ^^^^^^^^^^
79
80 error: called `unwrap_err` on `y` after checking its variant with `is_ok`
81   --> $DIR/complex_conditionals.rs:28:9
82    |
83 LL |     if x.is_ok() || y.is_ok() {
84    |                     --------- the check is happening here
85 ...
86 LL |         y.unwrap_err(); // unnecessary
87    |         ^^^^^^^^^^^^^^
88    |
89    = help: try using `if let` or `match`
90
91 error: called `unwrap` on `x` after checking its variant with `is_ok`
92   --> $DIR/complex_conditionals.rs:32:9
93    |
94 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
95    |        --------- the check is happening here
96 LL |         x.unwrap(); // unnecessary
97    |         ^^^^^^^^^^
98    |
99    = help: try using `if let` or `match`
100
101 error: this call to `unwrap_err()` will always panic
102   --> $DIR/complex_conditionals.rs:33:9
103    |
104 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
105    |        --------- because of this check
106 LL |         x.unwrap(); // unnecessary
107 LL |         x.unwrap_err(); // will panic
108    |         ^^^^^^^^^^^^^^
109
110 error: this call to `unwrap()` will always panic
111   --> $DIR/complex_conditionals.rs:34:9
112    |
113 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
114    |                       --------- because of this check
115 ...
116 LL |         y.unwrap(); // will panic
117    |         ^^^^^^^^^^
118
119 error: called `unwrap_err` on `y` after checking its variant with `is_ok`
120   --> $DIR/complex_conditionals.rs:35:9
121    |
122 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
123    |                       --------- the check is happening here
124 ...
125 LL |         y.unwrap_err(); // unnecessary
126    |         ^^^^^^^^^^^^^^
127    |
128    = help: try using `if let` or `match`
129
130 error: called `unwrap` on `z` after checking its variant with `is_err`
131   --> $DIR/complex_conditionals.rs:36:9
132    |
133 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
134    |                                    ---------- the check is happening here
135 ...
136 LL |         z.unwrap(); // unnecessary
137    |         ^^^^^^^^^^
138    |
139    = help: try using `if let` or `match`
140
141 error: this call to `unwrap_err()` will always panic
142   --> $DIR/complex_conditionals.rs:37:9
143    |
144 LL |     if x.is_ok() && !(y.is_ok() || z.is_err()) {
145    |                                    ---------- because of this check
146 ...
147 LL |         z.unwrap_err(); // will panic
148    |         ^^^^^^^^^^^^^^
149
150 error: this call to `unwrap()` will always panic
151   --> $DIR/complex_conditionals.rs:45:9
152    |
153 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
154    |        --------- because of this check
155 ...
156 LL |         x.unwrap(); // will panic
157    |         ^^^^^^^^^^
158
159 error: called `unwrap_err` on `x` after checking its variant with `is_ok`
160   --> $DIR/complex_conditionals.rs:46:9
161    |
162 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
163    |        --------- the check is happening here
164 ...
165 LL |         x.unwrap_err(); // unnecessary
166    |         ^^^^^^^^^^^^^^
167    |
168    = help: try using `if let` or `match`
169
170 error: called `unwrap` on `y` after checking its variant with `is_ok`
171   --> $DIR/complex_conditionals.rs:47:9
172    |
173 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
174    |                       --------- the check is happening here
175 ...
176 LL |         y.unwrap(); // unnecessary
177    |         ^^^^^^^^^^
178    |
179    = help: try using `if let` or `match`
180
181 error: this call to `unwrap_err()` will always panic
182   --> $DIR/complex_conditionals.rs:48:9
183    |
184 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
185    |                       --------- because of this check
186 ...
187 LL |         y.unwrap_err(); // will panic
188    |         ^^^^^^^^^^^^^^
189
190 error: this call to `unwrap()` will always panic
191   --> $DIR/complex_conditionals.rs:49:9
192    |
193 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
194    |                                    ---------- because of this check
195 ...
196 LL |         z.unwrap(); // will panic
197    |         ^^^^^^^^^^
198
199 error: called `unwrap_err` on `z` after checking its variant with `is_err`
200   --> $DIR/complex_conditionals.rs:50:9
201    |
202 LL |     if x.is_ok() || !(y.is_ok() && z.is_err()) {
203    |                                    ---------- the check is happening here
204 ...
205 LL |         z.unwrap_err(); // unnecessary
206    |         ^^^^^^^^^^^^^^
207    |
208    = help: try using `if let` or `match`
209
210 error: aborting due to 20 previous errors
211