Fix #2927
This commit is contained in:
parent
bac76afb5a
commit
bbd67c9b78
6 changed files with 41 additions and 50 deletions
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
#![warn(clippy,similar_names)]
|
||||
#![allow(unused)]
|
||||
#![allow(unused, println_empty_string)]
|
||||
|
||||
|
||||
struct Foo {
|
||||
|
|
@ -142,6 +142,11 @@ fn underscores_and_numbers() {
|
|||
let _1_ok= 1;
|
||||
}
|
||||
|
||||
fn issue2927() {
|
||||
let args = 1;
|
||||
format!("{:?}", 2);
|
||||
}
|
||||
|
||||
struct Bar;
|
||||
|
||||
impl Bar {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,3 @@
|
|||
error: using `println!("")`
|
||||
--> $DIR/non_expressive_names.rs:60:14
|
||||
|
|
||||
60 | _ => println!(""),
|
||||
| ^^^^^^^^^^^^ help: replace it with: `println!()`
|
||||
|
|
||||
= note: `-D println-empty-string` implied by `-D warnings`
|
||||
|
||||
error: using `println!("")`
|
||||
--> $DIR/non_expressive_names.rs:128:18
|
||||
|
|
||||
128 | 1 => println!(""),
|
||||
| ^^^^^^^^^^^^ help: replace it with: `println!()`
|
||||
|
||||
error: using `println!("")`
|
||||
--> $DIR/non_expressive_names.rs:132:18
|
||||
|
|
||||
132 | 1 => println!(""),
|
||||
| ^^^^^^^^^^^^ help: replace it with: `println!()`
|
||||
|
||||
error: binding's name is too similar to existing binding
|
||||
--> $DIR/non_expressive_names.rs:18:9
|
||||
|
|
||||
|
|
@ -170,22 +150,22 @@ error: consider choosing a more descriptive name
|
|||
| ^^^^^^^
|
||||
|
||||
error: consider choosing a more descriptive name
|
||||
--> $DIR/non_expressive_names.rs:149:13
|
||||
--> $DIR/non_expressive_names.rs:154:13
|
||||
|
|
||||
149 | let _1 = 1;
|
||||
154 | let _1 = 1;
|
||||
| ^^
|
||||
|
||||
error: consider choosing a more descriptive name
|
||||
--> $DIR/non_expressive_names.rs:150:13
|
||||
--> $DIR/non_expressive_names.rs:155:13
|
||||
|
|
||||
150 | let ____1 = 1;
|
||||
155 | let ____1 = 1;
|
||||
| ^^^^^
|
||||
|
||||
error: consider choosing a more descriptive name
|
||||
--> $DIR/non_expressive_names.rs:151:13
|
||||
--> $DIR/non_expressive_names.rs:156:13
|
||||
|
|
||||
151 | let __1___2 = 12;
|
||||
156 | let __1___2 = 12;
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to 20 previous errors
|
||||
error: aborting due to 17 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue