]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/checked_unwrap/complex_conditionals.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / checked_unwrap / complex_conditionals.stderr
CommitLineData
f20569fa
XL
1error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
2 --> $DIR/complex_conditionals.rs:8:9
3 |
4LL | if x.is_ok() && y.is_err() {
5 | --------- the check is happening here
6LL | x.unwrap(); // unnecessary
7 | ^^^^^^^^^^
8 |
9note: the lint level is defined here
10 --> $DIR/complex_conditionals.rs:1:35
11 |
12LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15error: this call to `unwrap_err()` will always panic
16 --> $DIR/complex_conditionals.rs:9:9
17 |
18LL | if x.is_ok() && y.is_err() {
19 | --------- because of this check
20LL | x.unwrap(); // unnecessary
21LL | x.unwrap_err(); // will panic
22 | ^^^^^^^^^^^^^^
23 |
24note: the lint level is defined here
25 --> $DIR/complex_conditionals.rs:1:9
26 |
27LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28 | ^^^^^^^^^^^^^^^^^^^^^^^^
29
30error: this call to `unwrap()` will always panic
31 --> $DIR/complex_conditionals.rs:10:9
32 |
33LL | if x.is_ok() && y.is_err() {
34 | ---------- because of this check
35...
36LL | y.unwrap(); // will panic
37 | ^^^^^^^^^^
38
39error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
40 --> $DIR/complex_conditionals.rs:11:9
41 |
42LL | if x.is_ok() && y.is_err() {
43 | ---------- the check is happening here
44...
45LL | y.unwrap_err(); // unnecessary
46 | ^^^^^^^^^^^^^^
47
48error: this call to `unwrap()` will always panic
49 --> $DIR/complex_conditionals.rs:25:9
50 |
51LL | if x.is_ok() || y.is_ok() {
52 | --------- because of this check
53...
54LL | x.unwrap(); // will panic
55 | ^^^^^^^^^^
56
57error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
58 --> $DIR/complex_conditionals.rs:26:9
59 |
60LL | if x.is_ok() || y.is_ok() {
61 | --------- the check is happening here
62...
63LL | x.unwrap_err(); // unnecessary
64 | ^^^^^^^^^^^^^^
65
66error: this call to `unwrap()` will always panic
67 --> $DIR/complex_conditionals.rs:27:9
68 |
69LL | if x.is_ok() || y.is_ok() {
70 | --------- because of this check
71...
72LL | y.unwrap(); // will panic
73 | ^^^^^^^^^^
74
75error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
76 --> $DIR/complex_conditionals.rs:28:9
77 |
78LL | if x.is_ok() || y.is_ok() {
79 | --------- the check is happening here
80...
81LL | y.unwrap_err(); // unnecessary
82 | ^^^^^^^^^^^^^^
83
84error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
85 --> $DIR/complex_conditionals.rs:32:9
86 |
87LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
88 | --------- the check is happening here
89LL | x.unwrap(); // unnecessary
90 | ^^^^^^^^^^
91
92error: this call to `unwrap_err()` will always panic
93 --> $DIR/complex_conditionals.rs:33:9
94 |
95LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
96 | --------- because of this check
97LL | x.unwrap(); // unnecessary
98LL | x.unwrap_err(); // will panic
99 | ^^^^^^^^^^^^^^
100
101error: this call to `unwrap()` will always panic
102 --> $DIR/complex_conditionals.rs:34:9
103 |
104LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
105 | --------- because of this check
106...
107LL | y.unwrap(); // will panic
108 | ^^^^^^^^^^
109
110error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
111 --> $DIR/complex_conditionals.rs:35:9
112 |
113LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
114 | --------- the check is happening here
115...
116LL | y.unwrap_err(); // unnecessary
117 | ^^^^^^^^^^^^^^
118
119error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
120 --> $DIR/complex_conditionals.rs:36:9
121 |
122LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
123 | ---------- the check is happening here
124...
125LL | z.unwrap(); // unnecessary
126 | ^^^^^^^^^^
127
128error: this call to `unwrap_err()` will always panic
129 --> $DIR/complex_conditionals.rs:37:9
130 |
131LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
132 | ---------- because of this check
133...
134LL | z.unwrap_err(); // will panic
135 | ^^^^^^^^^^^^^^
136
137error: this call to `unwrap()` will always panic
138 --> $DIR/complex_conditionals.rs:45:9
139 |
140LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
141 | --------- because of this check
142...
143LL | x.unwrap(); // will panic
144 | ^^^^^^^^^^
145
146error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
147 --> $DIR/complex_conditionals.rs:46:9
148 |
149LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
150 | --------- the check is happening here
151...
152LL | x.unwrap_err(); // unnecessary
153 | ^^^^^^^^^^^^^^
154
155error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
156 --> $DIR/complex_conditionals.rs:47:9
157 |
158LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
159 | --------- the check is happening here
160...
161LL | y.unwrap(); // unnecessary
162 | ^^^^^^^^^^
163
164error: this call to `unwrap_err()` will always panic
165 --> $DIR/complex_conditionals.rs:48:9
166 |
167LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
168 | --------- because of this check
169...
170LL | y.unwrap_err(); // will panic
171 | ^^^^^^^^^^^^^^
172
173error: this call to `unwrap()` will always panic
174 --> $DIR/complex_conditionals.rs:49:9
175 |
176LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
177 | ---------- because of this check
178...
179LL | z.unwrap(); // will panic
180 | ^^^^^^^^^^
181
182error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
183 --> $DIR/complex_conditionals.rs:50:9
184 |
185LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
186 | ---------- the check is happening here
187...
188LL | z.unwrap_err(); // unnecessary
189 | ^^^^^^^^^^^^^^
190
191error: aborting due to 20 previous errors
192