]> git.lizzy.rs Git - rust.git/blob - tests/ui/format.stderr
Auto merge of #4314 - chansuke:add-negation-to-is_empty, r=flip1995
[rust.git] / tests / ui / format.stderr
1 error: useless use of `format!`
2   --> $DIR/format.rs:13: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:14:5
11    |
12 LL |     format!("{{}}");
13    |     ^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{}".to_string();`
14
15 error: useless use of `format!`
16   --> $DIR/format.rs:15:5
17    |
18 LL |     format!("{{}} abc {{}}");
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"{} abc {}".to_string();`
20
21 error: useless use of `format!`
22   --> $DIR/format.rs:17:5
23    |
24 LL |     format!("{}", "foo");
25    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
26
27 error: useless use of `format!`
28   --> $DIR/format.rs:21:5
29    |
30 LL |     format!("{:+}", "foo"); // Warn when the format makes no difference.
31    |     ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
32
33 error: useless use of `format!`
34   --> $DIR/format.rs:22:5
35    |
36 LL |     format!("{:<}", "foo"); // Warn when the format makes no difference.
37    |     ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"foo".to_string();`
38
39 error: useless use of `format!`
40   --> $DIR/format.rs:27:5
41    |
42 LL |     format!("{}", arg);
43    |     ^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
44
45 error: useless use of `format!`
46   --> $DIR/format.rs:31:5
47    |
48 LL |     format!("{:+}", arg); // Warn when the format makes no difference.
49    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
50
51 error: useless use of `format!`
52   --> $DIR/format.rs:32:5
53    |
54 LL |     format!("{:<}", arg); // Warn when the format makes no difference.
55    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `arg.to_string();`
56
57 error: useless use of `format!`
58   --> $DIR/format.rs:59:5
59    |
60 LL |     format!("{}", 42.to_string());
61    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `42.to_string();`
62
63 error: useless use of `format!`
64   --> $DIR/format.rs:61:5
65    |
66 LL |     format!("{}", x.display().to_string());
67    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `to_string()` is enough: `x.display().to_string();`
68
69 error: aborting due to 11 previous errors
70