Skip to content

Commit 36cd745

Browse files
committed
Regressions (#2041)
1 parent 6b583d6 commit 36cd745

File tree

3 files changed

+129
-42
lines changed

3 files changed

+129
-42
lines changed

tests/ui/format.stderr

+1-13
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,5 @@ error: useless use of `format!`
66
|
77
= note: `-D useless-format` implied by `-D warnings`
88

9-
error: useless use of `format!`
10-
--> $DIR/format.rs:8:5
11-
|
12-
8 | format!("{}", "foo");
13-
| ^^^^^^^^^^^^^^^^^^^^^
14-
15-
error: useless use of `format!`
16-
--> $DIR/format.rs:15:5
17-
|
18-
15 | format!("{}", arg);
19-
| ^^^^^^^^^^^^^^^^^^^
20-
21-
error: aborting due to 3 previous errors
9+
error: aborting due to previous error
2210

tests/ui/matches.stderr

+128-1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,25 @@ error: Err(_) will match all errors, maybe not a good idea
249249
= note: `-D match-wild-err-arm` implied by `-D warnings`
250250
= note: to remove this warning, match each error seperately or use unreachable macro
251251

252+
error: this `match` has identical arm bodies
253+
--> $DIR/matches.rs:239:18
254+
|
255+
239 | Ok(_) => println!("ok"),
256+
| ^^^^^^^^^^^^^^
257+
|
258+
= note: `-D match-same-arms` implied by `-D warnings`
259+
note: same as this
260+
--> $DIR/matches.rs:238:18
261+
|
262+
238 | Ok(3) => println!("ok"),
263+
| ^^^^^^^^^^^^^^
264+
note: consider refactoring into `Ok(3) | Ok(_)`
265+
--> $DIR/matches.rs:238:18
266+
|
267+
238 | Ok(3) => println!("ok"),
268+
| ^^^^^^^^^^^^^^
269+
= note: this error originates in a macro outside of the current crate
270+
252271
error: Err(_) will match all errors, maybe not a good idea
253272
--> $DIR/matches.rs:246:9
254273
|
@@ -257,6 +276,24 @@ error: Err(_) will match all errors, maybe not a good idea
257276
|
258277
= note: to remove this warning, match each error seperately or use unreachable macro
259278

279+
error: this `match` has identical arm bodies
280+
--> $DIR/matches.rs:245:18
281+
|
282+
245 | Ok(_) => println!("ok"),
283+
| ^^^^^^^^^^^^^^
284+
|
285+
note: same as this
286+
--> $DIR/matches.rs:244:18
287+
|
288+
244 | Ok(3) => println!("ok"),
289+
| ^^^^^^^^^^^^^^
290+
note: consider refactoring into `Ok(3) | Ok(_)`
291+
--> $DIR/matches.rs:244:18
292+
|
293+
244 | Ok(3) => println!("ok"),
294+
| ^^^^^^^^^^^^^^
295+
= note: this error originates in a macro outside of the current crate
296+
260297
error: Err(_) will match all errors, maybe not a good idea
261298
--> $DIR/matches.rs:252:9
262299
|
@@ -265,5 +302,95 @@ error: Err(_) will match all errors, maybe not a good idea
265302
|
266303
= note: to remove this warning, match each error seperately or use unreachable macro
267304

268-
error: aborting due to 26 previous errors
305+
error: this `match` has identical arm bodies
306+
--> $DIR/matches.rs:251:18
307+
|
308+
251 | Ok(_) => println!("ok"),
309+
| ^^^^^^^^^^^^^^
310+
|
311+
note: same as this
312+
--> $DIR/matches.rs:250:18
313+
|
314+
250 | Ok(3) => println!("ok"),
315+
| ^^^^^^^^^^^^^^
316+
note: consider refactoring into `Ok(3) | Ok(_)`
317+
--> $DIR/matches.rs:250:18
318+
|
319+
250 | Ok(3) => println!("ok"),
320+
| ^^^^^^^^^^^^^^
321+
= note: this error originates in a macro outside of the current crate
322+
323+
error: this `match` has identical arm bodies
324+
--> $DIR/matches.rs:258:18
325+
|
326+
258 | Ok(_) => println!("ok"),
327+
| ^^^^^^^^^^^^^^
328+
|
329+
note: same as this
330+
--> $DIR/matches.rs:257:18
331+
|
332+
257 | Ok(3) => println!("ok"),
333+
| ^^^^^^^^^^^^^^
334+
note: consider refactoring into `Ok(3) | Ok(_)`
335+
--> $DIR/matches.rs:257:18
336+
|
337+
257 | Ok(3) => println!("ok"),
338+
| ^^^^^^^^^^^^^^
339+
= note: this error originates in a macro outside of the current crate
340+
341+
error: this `match` has identical arm bodies
342+
--> $DIR/matches.rs:265:18
343+
|
344+
265 | Ok(_) => println!("ok"),
345+
| ^^^^^^^^^^^^^^
346+
|
347+
note: same as this
348+
--> $DIR/matches.rs:264:18
349+
|
350+
264 | Ok(3) => println!("ok"),
351+
| ^^^^^^^^^^^^^^
352+
note: consider refactoring into `Ok(3) | Ok(_)`
353+
--> $DIR/matches.rs:264:18
354+
|
355+
264 | Ok(3) => println!("ok"),
356+
| ^^^^^^^^^^^^^^
357+
= note: this error originates in a macro outside of the current crate
358+
359+
error: this `match` has identical arm bodies
360+
--> $DIR/matches.rs:271:18
361+
|
362+
271 | Ok(_) => println!("ok"),
363+
| ^^^^^^^^^^^^^^
364+
|
365+
note: same as this
366+
--> $DIR/matches.rs:270:18
367+
|
368+
270 | Ok(3) => println!("ok"),
369+
| ^^^^^^^^^^^^^^
370+
note: consider refactoring into `Ok(3) | Ok(_)`
371+
--> $DIR/matches.rs:270:18
372+
|
373+
270 | Ok(3) => println!("ok"),
374+
| ^^^^^^^^^^^^^^
375+
= note: this error originates in a macro outside of the current crate
376+
377+
error: this `match` has identical arm bodies
378+
--> $DIR/matches.rs:277:18
379+
|
380+
277 | Ok(_) => println!("ok"),
381+
| ^^^^^^^^^^^^^^
382+
|
383+
note: same as this
384+
--> $DIR/matches.rs:276:18
385+
|
386+
276 | Ok(3) => println!("ok"),
387+
| ^^^^^^^^^^^^^^
388+
note: consider refactoring into `Ok(3) | Ok(_)`
389+
--> $DIR/matches.rs:276:18
390+
|
391+
276 | Ok(3) => println!("ok"),
392+
| ^^^^^^^^^^^^^^
393+
= note: this error originates in a macro outside of the current crate
394+
395+
error: aborting due to 33 previous errors
269396

tests/ui/print_with_newline.stderr

-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +0,0 @@
1-
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
2-
--> $DIR/print_with_newline.rs:6:5
3-
|
4-
6 | print!("Hello/n");
5-
| ^^^^^^^^^^^^^^^^^^
6-
|
7-
= note: `-D print-with-newline` implied by `-D warnings`
8-
9-
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
10-
--> $DIR/print_with_newline.rs:7:5
11-
|
12-
7 | print!("Hello {}/n", "world");
13-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14-
15-
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
16-
--> $DIR/print_with_newline.rs:8:5
17-
|
18-
8 | print!("Hello {} {}/n/n", "world", "#2");
19-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20-
21-
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
22-
--> $DIR/print_with_newline.rs:9:5
23-
|
24-
9 | print!("{}/n", 1265);
25-
| ^^^^^^^^^^^^^^^^^^^^^
26-
27-
error: aborting due to 4 previous errors
28-

0 commit comments

Comments
 (0)