diff options
| author | Michael Wright <mikerite@lavabit.com> | 2018-08-15 08:11:07 +0200 |
|---|---|---|
| committer | Michael Wright <mikerite@lavabit.com> | 2018-08-15 08:11:07 +0200 |
| commit | bbd67c9b78f41ddead23fd03ea5d8d613cb96b45 (patch) | |
| tree | 52b9b0bfdf068aac29ef28efee47b2f5ae0c33eb /tests | |
| parent | bac76afb5a7885de19bfd9e6191fe8e2a29bd74d (diff) | |
| download | rust-bbd67c9b78f41ddead23fd03ea5d8d613cb96b45.tar.gz rust-bbd67c9b78f41ddead23fd03ea5d8d613cb96b45.zip | |
Fix #2927
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/non_expressive_names.rs | 7 | ||||
| -rw-r--r-- | tests/ui/non_expressive_names.stderr | 34 |
2 files changed, 13 insertions, 28 deletions
diff --git a/tests/ui/non_expressive_names.rs b/tests/ui/non_expressive_names.rs index 19f0889a92c..7149bf8f3e7 100644 --- a/tests/ui/non_expressive_names.rs +++ b/tests/ui/non_expressive_names.rs @@ -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 { diff --git a/tests/ui/non_expressive_names.stderr b/tests/ui/non_expressive_names.stderr index c63b493db8d..b4927e69e67 100644 --- a/tests/ui/non_expressive_names.stderr +++ b/tests/ui/non_expressive_names.stderr @@ -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 |
