mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Regressions (#2041)
This commit is contained in:
parent
6b583d63d8
commit
36cd745640
3 changed files with 129 additions and 42 deletions
|
@ -6,17 +6,5 @@ error: useless use of `format!`
|
|||
|
|
||||
= note: `-D useless-format` implied by `-D warnings`
|
||||
|
||||
error: useless use of `format!`
|
||||
--> $DIR/format.rs:8:5
|
||||
|
|
||||
8 | format!("{}", "foo");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: useless use of `format!`
|
||||
--> $DIR/format.rs:15:5
|
||||
|
|
||||
15 | format!("{}", arg);
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
@ -249,6 +249,25 @@ error: Err(_) will match all errors, maybe not a good idea
|
|||
= note: `-D match-wild-err-arm` implied by `-D warnings`
|
||||
= note: to remove this warning, match each error seperately or use unreachable macro
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:239:18
|
||||
|
|
||||
239 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D match-same-arms` implied by `-D warnings`
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:238:18
|
||||
|
|
||||
238 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:238:18
|
||||
|
|
||||
238 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: Err(_) will match all errors, maybe not a good idea
|
||||
--> $DIR/matches.rs:246:9
|
||||
|
|
||||
|
@ -257,6 +276,24 @@ error: Err(_) will match all errors, maybe not a good idea
|
|||
|
|
||||
= note: to remove this warning, match each error seperately or use unreachable macro
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:245:18
|
||||
|
|
||||
245 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:244:18
|
||||
|
|
||||
244 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:244:18
|
||||
|
|
||||
244 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: Err(_) will match all errors, maybe not a good idea
|
||||
--> $DIR/matches.rs:252:9
|
||||
|
|
||||
|
@ -265,5 +302,95 @@ error: Err(_) will match all errors, maybe not a good idea
|
|||
|
|
||||
= note: to remove this warning, match each error seperately or use unreachable macro
|
||||
|
||||
error: aborting due to 26 previous errors
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:251:18
|
||||
|
|
||||
251 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:250:18
|
||||
|
|
||||
250 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:250:18
|
||||
|
|
||||
250 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:258:18
|
||||
|
|
||||
258 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:257:18
|
||||
|
|
||||
257 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:257:18
|
||||
|
|
||||
257 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:265:18
|
||||
|
|
||||
265 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:264:18
|
||||
|
|
||||
264 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:264:18
|
||||
|
|
||||
264 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:271:18
|
||||
|
|
||||
271 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:270:18
|
||||
|
|
||||
270 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:270:18
|
||||
|
|
||||
270 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: this `match` has identical arm bodies
|
||||
--> $DIR/matches.rs:277:18
|
||||
|
|
||||
277 | Ok(_) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
note: same as this
|
||||
--> $DIR/matches.rs:276:18
|
||||
|
|
||||
276 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: consider refactoring into `Ok(3) | Ok(_)`
|
||||
--> $DIR/matches.rs:276:18
|
||||
|
|
||||
276 | Ok(3) => println!("ok"),
|
||||
| ^^^^^^^^^^^^^^
|
||||
= note: this error originates in a macro outside of the current crate
|
||||
|
||||
error: aborting due to 33 previous errors
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
|
||||
--> $DIR/print_with_newline.rs:6:5
|
||||
|
|
||||
6 | print!("Hello/n");
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D print-with-newline` implied by `-D warnings`
|
||||
|
||||
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
|
||||
--> $DIR/print_with_newline.rs:7:5
|
||||
|
|
||||
7 | print!("Hello {}/n", "world");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
|
||||
--> $DIR/print_with_newline.rs:8:5
|
||||
|
|
||||
8 | print!("Hello {} {}/n/n", "world", "#2");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: using `print!()` with a format string that ends in a newline, consider using `println!()` instead
|
||||
--> $DIR/print_with_newline.rs:9:5
|
||||
|
|
||||
9 | print!("{}/n", 1265);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
Loading…
Add table
Reference in a new issue