@@ -78,37 +78,45 @@ LL | Ok(3) => println!("ok"),
78
78
| ^^^^^
79
79
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
80
80
81
+ error: `Err(_)` will match all errors, maybe not a good idea
82
+ --> $DIR/matches.rs:34:9
83
+ |
84
+ LL | Err(_e) => panic!(),
85
+ | ^^^^^^^
86
+ |
87
+ = note: to remove this warning, match each error separately or use `unreachable!` macro
88
+
81
89
error: this `match` has identical arm bodies
82
- --> $DIR/matches.rs:34 :18
90
+ --> $DIR/matches.rs:33 :18
83
91
|
84
92
LL | Ok(_) => println!("ok"),
85
93
| ^^^^^^^^^^^^^^
86
94
|
87
95
note: same as this
88
- --> $DIR/matches.rs:33 :18
96
+ --> $DIR/matches.rs:32 :18
89
97
|
90
98
LL | Ok(3) => println!("ok"),
91
99
| ^^^^^^^^^^^^^^
92
100
help: consider refactoring into `Ok(3) | Ok(_)`
93
- --> $DIR/matches.rs:33 :9
101
+ --> $DIR/matches.rs:32 :9
94
102
|
95
103
LL | Ok(3) => println!("ok"),
96
104
| ^^^^^
97
105
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
98
106
99
107
error: this `match` has identical arm bodies
100
- --> $DIR/matches.rs:41 :18
108
+ --> $DIR/matches.rs:40 :18
101
109
|
102
110
LL | Ok(_) => println!("ok"),
103
111
| ^^^^^^^^^^^^^^
104
112
|
105
113
note: same as this
106
- --> $DIR/matches.rs:40 :18
114
+ --> $DIR/matches.rs:39 :18
107
115
|
108
116
LL | Ok(3) => println!("ok"),
109
117
| ^^^^^^^^^^^^^^
110
118
help: consider refactoring into `Ok(3) | Ok(_)`
111
- --> $DIR/matches.rs:40 :9
119
+ --> $DIR/matches.rs:39 :9
112
120
|
113
121
LL | Ok(3) => println!("ok"),
114
122
| ^^^^^
@@ -133,58 +141,94 @@ LL | Ok(3) => println!("ok"),
133
141
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
134
142
135
143
error: this `match` has identical arm bodies
144
+ --> $DIR/matches.rs:54:18
145
+ |
146
+ LL | Ok(_) => println!("ok"),
147
+ | ^^^^^^^^^^^^^^
148
+ |
149
+ note: same as this
136
150
--> $DIR/matches.rs:53:18
137
151
|
152
+ LL | Ok(3) => println!("ok"),
153
+ | ^^^^^^^^^^^^^^
154
+ help: consider refactoring into `Ok(3) | Ok(_)`
155
+ --> $DIR/matches.rs:53:9
156
+ |
157
+ LL | Ok(3) => println!("ok"),
158
+ | ^^^^^
159
+ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
160
+
161
+ error: this `match` has identical arm bodies
162
+ --> $DIR/matches.rs:60:18
163
+ |
164
+ LL | Ok(_) => println!("ok"),
165
+ | ^^^^^^^^^^^^^^
166
+ |
167
+ note: same as this
168
+ --> $DIR/matches.rs:59:18
169
+ |
170
+ LL | Ok(3) => println!("ok"),
171
+ | ^^^^^^^^^^^^^^
172
+ help: consider refactoring into `Ok(3) | Ok(_)`
173
+ --> $DIR/matches.rs:59:9
174
+ |
175
+ LL | Ok(3) => println!("ok"),
176
+ | ^^^^^
177
+ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
178
+
179
+ error: this `match` has identical arm bodies
180
+ --> $DIR/matches.rs:66:18
181
+ |
138
182
LL | Ok(_) => println!("ok"),
139
183
| ^^^^^^^^^^^^^^
140
184
|
141
185
note: same as this
142
- --> $DIR/matches.rs:52 :18
186
+ --> $DIR/matches.rs:65 :18
143
187
|
144
188
LL | Ok(3) => println!("ok"),
145
189
| ^^^^^^^^^^^^^^
146
190
help: consider refactoring into `Ok(3) | Ok(_)`
147
- --> $DIR/matches.rs:52 :9
191
+ --> $DIR/matches.rs:65 :9
148
192
|
149
193
LL | Ok(3) => println!("ok"),
150
194
| ^^^^^
151
195
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
152
196
153
197
error: this `match` has identical arm bodies
154
- --> $DIR/matches.rs:76 :29
198
+ --> $DIR/matches.rs:89 :29
155
199
|
156
200
LL | (Ok(_), Some(x)) => println!("ok {}", x),
157
201
| ^^^^^^^^^^^^^^^^^^^^
158
202
|
159
203
note: same as this
160
- --> $DIR/matches.rs:75 :29
204
+ --> $DIR/matches.rs:88 :29
161
205
|
162
206
LL | (Ok(x), Some(_)) => println!("ok {}", x),
163
207
| ^^^^^^^^^^^^^^^^^^^^
164
208
help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
165
- --> $DIR/matches.rs:75 :9
209
+ --> $DIR/matches.rs:88 :9
166
210
|
167
211
LL | (Ok(x), Some(_)) => println!("ok {}", x),
168
212
| ^^^^^^^^^^^^^^^^
169
213
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
170
214
171
215
error: this `match` has identical arm bodies
172
- --> $DIR/matches.rs:91 :18
216
+ --> $DIR/matches.rs:104 :18
173
217
|
174
218
LL | Ok(_) => println!("ok"),
175
219
| ^^^^^^^^^^^^^^
176
220
|
177
221
note: same as this
178
- --> $DIR/matches.rs:90 :18
222
+ --> $DIR/matches.rs:103 :18
179
223
|
180
224
LL | Ok(3) => println!("ok"),
181
225
| ^^^^^^^^^^^^^^
182
226
help: consider refactoring into `Ok(3) | Ok(_)`
183
- --> $DIR/matches.rs:90 :9
227
+ --> $DIR/matches.rs:103 :9
184
228
|
185
229
LL | Ok(3) => println!("ok"),
186
230
| ^^^^^
187
231
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
188
232
189
- error: aborting due to 12 previous errors
233
+ error: aborting due to 15 previous errors
190
234
0 commit comments