1 error: useless use of `format!`
2 --> $DIR/format.rs:22: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:24:5
12 24 | 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:28:5
20 28 | 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:29:5
28 29 | 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:34:5
36 34 | 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:38:5
44 38 | 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:39:5
52 39 | 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: useless use of `format!`
58 --> $DIR/format.rs:66:5
60 66 | format!("{}", 42.to_string());
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `42.to_string()`
63 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
65 error: useless use of `format!`
66 --> $DIR/format.rs:68:5
68 68 | format!("{}", x.display().to_string());
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `x.display().to_string()`
71 = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
73 error: aborting due to 9 previous errors