|
1 | 1 | error: useless use of `format!`
|
2 |
| - --> $DIR/format.rs:11:5 |
| 2 | + --> $DIR/format.rs:13:5 |
3 | 3 | |
|
4 | 4 | LL | format!("foo");
|
5 |
| - | ^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()` |
| 5 | + | ^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();` |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::useless-format` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: useless use of `format!`
|
10 |
| - --> $DIR/format.rs:13:5 |
| 10 | + --> $DIR/format.rs:15:5 |
11 | 11 | |
|
12 | 12 | LL | format!("{}", "foo");
|
13 |
| - | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()` |
14 |
| - | |
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) |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();` |
16 | 14 |
|
17 | 15 | error: useless use of `format!`
|
18 |
| - --> $DIR/format.rs:17:5 |
| 16 | + --> $DIR/format.rs:19:5 |
19 | 17 | |
|
20 | 18 | LL | format!("{:+}", "foo"); // warn when the format makes no difference
|
21 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()` |
22 |
| - | |
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) |
| 19 | + | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();` |
24 | 20 |
|
25 | 21 | error: useless use of `format!`
|
26 |
| - --> $DIR/format.rs:18:5 |
| 22 | + --> $DIR/format.rs:20:5 |
27 | 23 | |
|
28 | 24 | LL | format!("{:<}", "foo"); // warn when the format makes no difference
|
29 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()` |
30 |
| - | |
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) |
| 25 | + | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();` |
32 | 26 |
|
33 | 27 | error: useless use of `format!`
|
34 |
| - --> $DIR/format.rs:23:5 |
| 28 | + --> $DIR/format.rs:25:5 |
35 | 29 | |
|
36 | 30 | LL | format!("{}", arg);
|
37 |
| - | ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()` |
38 |
| - | |
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) |
| 31 | + | ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();` |
40 | 32 |
|
41 | 33 | error: useless use of `format!`
|
42 |
| - --> $DIR/format.rs:27:5 |
| 34 | + --> $DIR/format.rs:29:5 |
43 | 35 | |
|
44 | 36 | LL | format!("{:+}", arg); // warn when the format makes no difference
|
45 |
| - | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()` |
46 |
| - | |
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) |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();` |
48 | 38 |
|
49 | 39 | error: useless use of `format!`
|
50 |
| - --> $DIR/format.rs:28:5 |
| 40 | + --> $DIR/format.rs:30:5 |
51 | 41 | |
|
52 | 42 | LL | format!("{:<}", arg); // warn when the format makes no difference
|
53 |
| - | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string()` |
54 |
| - | |
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) |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();` |
56 | 44 |
|
57 | 45 | error: useless use of `format!`
|
58 |
| - --> $DIR/format.rs:55:5 |
| 46 | + --> $DIR/format.rs:57:5 |
59 | 47 | |
|
60 | 48 | LL | format!("{}", 42.to_string());
|
61 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `42.to_string()` |
62 |
| - | |
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) |
| 49 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `42.to_string();` |
64 | 50 |
|
65 | 51 | error: useless use of `format!`
|
66 |
| - --> $DIR/format.rs:57:5 |
| 52 | + --> $DIR/format.rs:59:5 |
67 | 53 | |
|
68 | 54 | LL | format!("{}", x.display().to_string());
|
69 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `x.display().to_string()` |
70 |
| - | |
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) |
| 55 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `x.display().to_string();` |
72 | 56 |
|
73 | 57 | error: aborting due to 9 previous errors
|
74 | 58 |
|
0 commit comments