@@ -7,52 +7,58 @@ LL | format!("foo");
7
7
= note: `-D clippy::useless-format` implied by `-D warnings`
8
8
9
9
error: useless use of `format!`
10
- --> $DIR/format.rs:15:5
10
+ --> $DIR/format.rs:14:5
11
+ |
12
+ LL | format!("{{}}");
13
+ | ^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{{}}".to_string();`
14
+
15
+ error: useless use of `format!`
16
+ --> $DIR/format.rs:16:5
11
17
|
12
18
LL | format!("{}", "foo");
13
19
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
14
20
15
21
error: useless use of `format!`
16
- --> $DIR/format.rs:19 :5
22
+ --> $DIR/format.rs:20 :5
17
23
|
18
24
LL | format!("{:+}", "foo"); // Warn when the format makes no difference.
19
25
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
20
26
21
27
error: useless use of `format!`
22
- --> $DIR/format.rs:20 :5
28
+ --> $DIR/format.rs:21 :5
23
29
|
24
30
LL | format!("{:<}", "foo"); // Warn when the format makes no difference.
25
31
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
26
32
27
33
error: useless use of `format!`
28
- --> $DIR/format.rs:25 :5
34
+ --> $DIR/format.rs:26 :5
29
35
|
30
36
LL | format!("{}", arg);
31
37
| ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
32
38
33
39
error: useless use of `format!`
34
- --> $DIR/format.rs:29 :5
40
+ --> $DIR/format.rs:30 :5
35
41
|
36
42
LL | format!("{:+}", arg); // Warn when the format makes no difference.
37
43
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
38
44
39
45
error: useless use of `format!`
40
- --> $DIR/format.rs:30 :5
46
+ --> $DIR/format.rs:31 :5
41
47
|
42
48
LL | format!("{:<}", arg); // Warn when the format makes no difference.
43
49
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
44
50
45
51
error: useless use of `format!`
46
- --> $DIR/format.rs:57 :5
52
+ --> $DIR/format.rs:58 :5
47
53
|
48
54
LL | format!("{}", 42.to_string());
49
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `42.to_string();`
50
56
51
57
error: useless use of `format!`
52
- --> $DIR/format.rs:59 :5
58
+ --> $DIR/format.rs:60 :5
53
59
|
54
60
LL | format!("{}", x.display().to_string());
55
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `x.display().to_string();`
56
62
57
- error: aborting due to 9 previous errors
63
+ error: aborting due to 10 previous errors
58
64
0 commit comments