@@ -78,37 +78,45 @@ LL | Ok(3) => println!("ok"),
7878 | ^^^^^
7979 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
8080
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+
8189error: this `match` has identical arm bodies
82- --> $DIR/matches.rs:34 :18
90+ --> $DIR/matches.rs:33 :18
8391 |
8492LL | Ok(_) => println!("ok"),
8593 | ^^^^^^^^^^^^^^
8694 |
8795note: same as this
88- --> $DIR/matches.rs:33 :18
96+ --> $DIR/matches.rs:32 :18
8997 |
9098LL | Ok(3) => println!("ok"),
9199 | ^^^^^^^^^^^^^^
92100help: consider refactoring into `Ok(3) | Ok(_)`
93- --> $DIR/matches.rs:33 :9
101+ --> $DIR/matches.rs:32 :9
94102 |
95103LL | Ok(3) => println!("ok"),
96104 | ^^^^^
97105 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
98106
99107error: this `match` has identical arm bodies
100- --> $DIR/matches.rs:41 :18
108+ --> $DIR/matches.rs:40 :18
101109 |
102110LL | Ok(_) => println!("ok"),
103111 | ^^^^^^^^^^^^^^
104112 |
105113note: same as this
106- --> $DIR/matches.rs:40 :18
114+ --> $DIR/matches.rs:39 :18
107115 |
108116LL | Ok(3) => println!("ok"),
109117 | ^^^^^^^^^^^^^^
110118help: consider refactoring into `Ok(3) | Ok(_)`
111- --> $DIR/matches.rs:40 :9
119+ --> $DIR/matches.rs:39 :9
112120 |
113121LL | Ok(3) => println!("ok"),
114122 | ^^^^^
@@ -133,58 +141,94 @@ LL | Ok(3) => println!("ok"),
133141 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
134142
135143error: 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
136150 --> $DIR/matches.rs:53:18
137151 |
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+ |
138182LL | Ok(_) => println!("ok"),
139183 | ^^^^^^^^^^^^^^
140184 |
141185note: same as this
142- --> $DIR/matches.rs:52 :18
186+ --> $DIR/matches.rs:65 :18
143187 |
144188LL | Ok(3) => println!("ok"),
145189 | ^^^^^^^^^^^^^^
146190help: consider refactoring into `Ok(3) | Ok(_)`
147- --> $DIR/matches.rs:52 :9
191+ --> $DIR/matches.rs:65 :9
148192 |
149193LL | Ok(3) => println!("ok"),
150194 | ^^^^^
151195 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
152196
153197error: this `match` has identical arm bodies
154- --> $DIR/matches.rs:76 :29
198+ --> $DIR/matches.rs:89 :29
155199 |
156200LL | (Ok(_), Some(x)) => println!("ok {}", x),
157201 | ^^^^^^^^^^^^^^^^^^^^
158202 |
159203note: same as this
160- --> $DIR/matches.rs:75 :29
204+ --> $DIR/matches.rs:88 :29
161205 |
162206LL | (Ok(x), Some(_)) => println!("ok {}", x),
163207 | ^^^^^^^^^^^^^^^^^^^^
164208help: consider refactoring into `(Ok(x), Some(_)) | (Ok(_), Some(x))`
165- --> $DIR/matches.rs:75 :9
209+ --> $DIR/matches.rs:88 :9
166210 |
167211LL | (Ok(x), Some(_)) => println!("ok {}", x),
168212 | ^^^^^^^^^^^^^^^^
169213 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
170214
171215error: this `match` has identical arm bodies
172- --> $DIR/matches.rs:91 :18
216+ --> $DIR/matches.rs:104 :18
173217 |
174218LL | Ok(_) => println!("ok"),
175219 | ^^^^^^^^^^^^^^
176220 |
177221note: same as this
178- --> $DIR/matches.rs:90 :18
222+ --> $DIR/matches.rs:103 :18
179223 |
180224LL | Ok(3) => println!("ok"),
181225 | ^^^^^^^^^^^^^^
182226help: consider refactoring into `Ok(3) | Ok(_)`
183- --> $DIR/matches.rs:90 :9
227+ --> $DIR/matches.rs:103 :9
184228 |
185229LL | Ok(3) => println!("ok"),
186230 | ^^^^^
187231 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
188232
189- error: aborting due to 12 previous errors
233+ error: aborting due to 15 previous errors
190234
0 commit comments