@@ -34,64 +34,70 @@ LL ~ " bar"##.to_string();
3434 |
3535
3636error: useless use of `format!`
37- --> $DIR/format.rs:21:5
37+ --> $DIR/format.rs:21:13
38+ |
39+ LL | let _ = format!("");
40+ | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
41+
42+ error: useless use of `format!`
43+ --> $DIR/format.rs:23:5
3844 |
3945LL | format!("{}", "foo");
4046 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
4147
4248error: useless use of `format!`
43- --> $DIR/format.rs:25 :5
49+ --> $DIR/format.rs:27 :5
4450 |
4551LL | format!("{:+}", "foo"); // Warn when the format makes no difference.
4652 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
4753
4854error: useless use of `format!`
49- --> $DIR/format.rs:26 :5
55+ --> $DIR/format.rs:28 :5
5056 |
5157LL | format!("{:<}", "foo"); // Warn when the format makes no difference.
5258 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
5359
5460error: useless use of `format!`
55- --> $DIR/format.rs:31 :5
61+ --> $DIR/format.rs:33 :5
5662 |
5763LL | format!("{}", arg);
5864 | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
5965
6066error: useless use of `format!`
61- --> $DIR/format.rs:35 :5
67+ --> $DIR/format.rs:37 :5
6268 |
6369LL | format!("{:+}", arg); // Warn when the format makes no difference.
6470 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
6571
6672error: useless use of `format!`
67- --> $DIR/format.rs:36 :5
73+ --> $DIR/format.rs:38 :5
6874 |
6975LL | format!("{:<}", arg); // Warn when the format makes no difference.
7076 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
7177
7278error: useless use of `format!`
73- --> $DIR/format.rs:63 :5
79+ --> $DIR/format.rs:65 :5
7480 |
7581LL | format!("{}", 42.to_string());
7682 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
7783
7884error: useless use of `format!`
79- --> $DIR/format.rs:65 :5
85+ --> $DIR/format.rs:67 :5
8086 |
8187LL | format!("{}", x.display().to_string());
8288 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
8389
8490error: useless use of `format!`
85- --> $DIR/format.rs:69 :18
91+ --> $DIR/format.rs:71 :18
8692 |
8793LL | let _ = Some(format!("{}", a + "bar"));
8894 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
8995
9096error: useless use of `format!`
91- --> $DIR/format.rs:73 :22
97+ --> $DIR/format.rs:75 :22
9298 |
9399LL | let _s: String = format!("{}", &*v.join("/n"));
94100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("/n")).to_string()`
95101
96- error: aborting due to 14 previous errors
102+ error: aborting due to 15 previous errors
97103
0 commit comments