1 error: useless use of `format!`
2 --> $DIR/format.rs:12: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:14:5
12 14 | format!("{}", "foo");
13 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()`
15 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
17 error: useless use of `format!`
18 --> $DIR/format.rs:17:5
20 17 | format!("{:+}", "foo"); // warn when the format makes no difference
21 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()`
23 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
25 error: useless use of `format!`
26 --> $DIR/format.rs:18:5
28 18 | format!("{:<}", "foo"); // warn when the format makes no difference
29 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()`
31 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
33 error: useless use of `format!`
34 --> $DIR/format.rs:23:5
36 23 | format!("{}", arg);
37 | ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()`
39 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
41 error: useless use of `format!`
42 --> $DIR/format.rs:26:5
44 26 | format!("{:+}", arg); // warn when the format makes no difference
45 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()`
47 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
49 error: useless use of `format!`
50 --> $DIR/format.rs:27:5
52 27 | format!("{:<}", arg); // warn when the format makes no difference
53 | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()`
55 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
57 error: aborting due to 7 previous errors