1 error: useless use of `format!`
2 --> $DIR/format.rs:18:5
5 | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
7 = note: `-D clippy::useless-format` implied by `-D warnings`
9 error: useless use of `format!`
10 --> $DIR/format.rs:19:5
13 | ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
15 error: useless use of `format!`
16 --> $DIR/format.rs:20:5
18 LL | format!("{{}} abc {{}}");
19 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{} abc {}".to_string()`
21 error: useless use of `format!`
22 --> $DIR/format.rs:21:5
30 help: consider using `.to_string()`
33 LL ~ " bar"##.to_string();
36 error: useless use of `format!`
37 --> $DIR/format.rs:26:13
39 LL | let _ = format!("");
40 | ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
42 error: useless use of `format!`
43 --> $DIR/format.rs:28:5
45 LL | format!("{}", "foo");
46 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
48 error: useless use of `format!`
49 --> $DIR/format.rs:32:5
51 LL | format!("{:+}", "foo"); // Warn when the format makes no difference.
52 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
54 error: useless use of `format!`
55 --> $DIR/format.rs:33:5
57 LL | format!("{:<}", "foo"); // Warn when the format makes no difference.
58 | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
60 error: useless use of `format!`
61 --> $DIR/format.rs:38:5
63 LL | format!("{}", arg);
64 | ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
66 error: useless use of `format!`
67 --> $DIR/format.rs:42:5
69 LL | format!("{:+}", arg); // Warn when the format makes no difference.
70 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
72 error: useless use of `format!`
73 --> $DIR/format.rs:43:5
75 LL | format!("{:<}", arg); // Warn when the format makes no difference.
76 | ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
78 error: useless use of `format!`
79 --> $DIR/format.rs:70:5
81 LL | format!("{}", 42.to_string());
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
84 error: useless use of `format!`
85 --> $DIR/format.rs:72:5
87 LL | format!("{}", x.display().to_string());
88 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
90 error: useless use of `format!`
91 --> $DIR/format.rs:76:18
93 LL | let _ = Some(format!("{}", a + "bar"));
94 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
96 error: useless use of `format!`
97 --> $DIR/format.rs:80:22
99 LL | let _s: String = format!("{}", &*v.join("/n"));
100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("/n")).to_string()`
102 error: useless use of `format!`
103 --> $DIR/format.rs:86:13
105 LL | let _ = format!("{x}");
106 | ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
108 error: useless use of `format!`
109 --> $DIR/format.rs:88:13
111 LL | let _ = format!("{y}", y = x);
112 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
114 error: aborting due to 17 previous errors