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