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