]> git.lizzy.rs Git - rust.git/blob - tests/ui/format.stderr
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
[rust.git] / tests / ui / format.stderr
1 error: useless use of `format!`
2   --> $DIR/format.rs:21:5
3    |
4 LL |     format!("foo");
5    |     ^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string()`
6    |
7    = note: `-D clippy::useless-format` implied by `-D warnings`
8
9 error: useless use of `format!`
10   --> $DIR/format.rs:23:5
11    |
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)
16
17 error: useless use of `format!`
18   --> $DIR/format.rs:27:5
19    |
20 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)
24
25 error: useless use of `format!`
26   --> $DIR/format.rs:28:5
27    |
28 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)
32
33 error: useless use of `format!`
34   --> $DIR/format.rs:33:5
35    |
36 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)
40
41 error: useless use of `format!`
42   --> $DIR/format.rs:37:5
43    |
44 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)
48
49 error: useless use of `format!`
50   --> $DIR/format.rs:38:5
51    |
52 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)
56
57 error: useless use of `format!`
58   --> $DIR/format.rs:65:5
59    |
60 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)
64
65 error: useless use of `format!`
66   --> $DIR/format.rs:67:5
67    |
68 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)
72
73 error: aborting due to 9 previous errors
74