@@ -19,52 +19,61 @@ LL | format!("{{}} abc {{}}");
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{} abc {}".to_string();`
2020
2121error: 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
2332 |
2433LL | format!("{}", "foo");
2534 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
2635
2736error: useless use of `format!`
28- --> $DIR/format.rs:21 :5
37+ --> $DIR/format.rs:25 :5
2938 |
3039LL | format!("{:+}", "foo"); // Warn when the format makes no difference.
3140 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
3241
3342error: useless use of `format!`
34- --> $DIR/format.rs:22 :5
43+ --> $DIR/format.rs:26 :5
3544 |
3645LL | format!("{:<}", "foo"); // Warn when the format makes no difference.
3746 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
3847
3948error: useless use of `format!`
40- --> $DIR/format.rs:27 :5
49+ --> $DIR/format.rs:31 :5
4150 |
4251LL | format!("{}", arg);
4352 | ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
4453
4554error: useless use of `format!`
46- --> $DIR/format.rs:31 :5
55+ --> $DIR/format.rs:35 :5
4756 |
4857LL | format!("{:+}", arg); // Warn when the format makes no difference.
4958 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
5059
5160error: useless use of `format!`
52- --> $DIR/format.rs:32 :5
61+ --> $DIR/format.rs:36 :5
5362 |
5463LL | format!("{:<}", arg); // Warn when the format makes no difference.
5564 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
5665
5766error: useless use of `format!`
58- --> $DIR/format.rs:59 :5
67+ --> $DIR/format.rs:63 :5
5968 |
6069LL | format!("{}", 42.to_string());
6170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `42.to_string();`
6271
6372error: useless use of `format!`
64- --> $DIR/format.rs:61 :5
73+ --> $DIR/format.rs:65 :5
6574 |
6675LL | format!("{}", x.display().to_string());
6776 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `x.display().to_string();`
6877
69- error: aborting due to 11 previous errors
78+ error: aborting due to 12 previous errors
7079
0 commit comments