@@ -19,52 +19,61 @@ LL | format!("{{}} abc {{}}");
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{} abc {}".to_string();`
20
20
21
21
error: useless use of `format!`
22
- --> $DIR/format.rs:17:5
22
+ --> $DIR/format.rs:16:5
23
+ |
24
+ LL | / format!(
25
+ LL | | r##"foo {{}}
26
+ LL | | " bar"##
27
+ LL | | );
28
+ | |______^ help: consider using .to_string(): `"foo {}/n/" bar".to_string();`
29
+
30
+ error: useless use of `format!`
31
+ --> $DIR/format.rs:21:5
23
32
|
24
33
LL | format!("{}", "foo");
25
34
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
26
35
27
36
error: useless use of `format!`
28
- --> $DIR/format.rs:21 :5
37
+ --> $DIR/format.rs:25 :5
29
38
|
30
39
LL | format!("{:+}", "foo"); // Warn when the format makes no difference.
31
40
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
32
41
33
42
error: useless use of `format!`
34
- --> $DIR/format.rs:22 :5
43
+ --> $DIR/format.rs:26 :5
35
44
|
36
45
LL | format!("{:<}", "foo"); // Warn when the format makes no difference.
37
46
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
38
47
39
48
error: useless use of `format!`
40
- --> $DIR/format.rs:27 :5
49
+ --> $DIR/format.rs:31 :5
41
50
|
42
51
LL | format!("{}", arg);
43
52
| ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
44
53
45
54
error: useless use of `format!`
46
- --> $DIR/format.rs:31 :5
55
+ --> $DIR/format.rs:35 :5
47
56
|
48
57
LL | format!("{:+}", arg); // Warn when the format makes no difference.
49
58
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
50
59
51
60
error: useless use of `format!`
52
- --> $DIR/format.rs:32 :5
61
+ --> $DIR/format.rs:36 :5
53
62
|
54
63
LL | format!("{:<}", arg); // Warn when the format makes no difference.
55
64
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
56
65
57
66
error: useless use of `format!`
58
- --> $DIR/format.rs:59 :5
67
+ --> $DIR/format.rs:63 :5
59
68
|
60
69
LL | format!("{}", 42.to_string());
61
70
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `42.to_string();`
62
71
63
72
error: useless use of `format!`
64
- --> $DIR/format.rs:61 :5
73
+ --> $DIR/format.rs:65 :5
65
74
|
66
75
LL | format!("{}", x.display().to_string());
67
76
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `x.display().to_string();`
68
77
69
- error: aborting due to 11 previous errors
78
+ error: aborting due to 12 previous errors
70
79
0 commit comments