]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/format.stderr
Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy
[rust.git] / src / tools / clippy / tests / ui / format.stderr
1 error: useless use of `format!`
2   --> $DIR/format.rs:19: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:20:5
11    |
12 LL |     format!("{{}}");
13    |     ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{}".to_string()`
14
15 error: useless use of `format!`
16   --> $DIR/format.rs:21: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:22:5
23    |
24 LL | /     format!(
25 LL | |         r##"foo {{}}
26 LL | | " bar"##
27 LL | |     );
28    | |_____^
29    |
30 help: consider using `.to_string()`
31    |
32 LL ~     r##"foo {}
33 LL ~ " bar"##.to_string();
34    |
35
36 error: useless use of `format!`
37   --> $DIR/format.rs:27:13
38    |
39 LL |     let _ = format!("");
40    |             ^^^^^^^^^^^ help: consider using `String::new()`: `String::new()`
41
42 error: useless use of `format!`
43   --> $DIR/format.rs:29:5
44    |
45 LL |     format!("{}", "foo");
46    |     ^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"foo".to_string()`
47
48 error: useless use of `format!`
49   --> $DIR/format.rs:37:5
50    |
51 LL |     format!("{}", arg);
52    |     ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `arg.to_string()`
53
54 error: useless use of `format!`
55   --> $DIR/format.rs:67:5
56    |
57 LL |     format!("{}", 42.to_string());
58    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `42.to_string()`
59
60 error: useless use of `format!`
61   --> $DIR/format.rs:69:5
62    |
63 LL |     format!("{}", x.display().to_string());
64    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.display().to_string()`
65
66 error: useless use of `format!`
67   --> $DIR/format.rs:73:18
68    |
69 LL |     let _ = Some(format!("{}", a + "bar"));
70    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `a + "bar"`
71
72 error: useless use of `format!`
73   --> $DIR/format.rs:77:22
74    |
75 LL |     let _s: String = format!("{}", &*v.join("/n"));
76    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `(&*v.join("/n")).to_string()`
77
78 error: useless use of `format!`
79   --> $DIR/format.rs:83:13
80    |
81 LL |     let _ = format!("{x}");
82    |             ^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
83
84 error: useless use of `format!`
85   --> $DIR/format.rs:85:13
86    |
87 LL |     let _ = format!("{y}", y = x);
88    |             ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `x.to_string()`
89
90 error: useless use of `format!`
91   --> $DIR/format.rs:89:13
92    |
93 LL |     let _ = format!("{abc}");
94    |             ^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `abc.to_string()`
95
96 error: useless use of `format!`
97   --> $DIR/format.rs:91:13
98    |
99 LL |     let _ = format!("{xx}");
100    |             ^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `xx.to_string()`
101
102 error: aborting due to 15 previous errors
103