]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/write_literal.stderr
Auto merge of #101969 - reez12g:issue-101306, r=reez12g
[rust.git] / src / tools / clippy / tests / ui / write_literal.stderr
1 error: literal with an empty format string
2   --> $DIR/write_literal.rs:31:27
3    |
4 LL |     write!(v, "Hello {}", "world");
5    |                           ^^^^^^^
6    |
7    = note: `-D clippy::write-literal` implied by `-D warnings`
8 help: try this
9    |
10 LL -     write!(v, "Hello {}", "world");
11 LL +     write!(v, "Hello world");
12    |
13
14 error: literal with an empty format string
15   --> $DIR/write_literal.rs:32:39
16    |
17 LL |     writeln!(v, "Hello {} {}", world, "world");
18    |                                       ^^^^^^^
19    |
20 help: try this
21    |
22 LL -     writeln!(v, "Hello {} {}", world, "world");
23 LL +     writeln!(v, "Hello {} world", world);
24    |
25
26 error: literal with an empty format string
27   --> $DIR/write_literal.rs:33:29
28    |
29 LL |     writeln!(v, "Hello {}", "world");
30    |                             ^^^^^^^
31    |
32 help: try this
33    |
34 LL -     writeln!(v, "Hello {}", "world");
35 LL +     writeln!(v, "Hello world");
36    |
37
38 error: literal with an empty format string
39   --> $DIR/write_literal.rs:34:29
40    |
41 LL |     writeln!(v, "{} {:.4}", "a literal", 5);
42    |                             ^^^^^^^^^^^
43    |
44 help: try this
45    |
46 LL -     writeln!(v, "{} {:.4}", "a literal", 5);
47 LL +     writeln!(v, "a literal {:.4}", 5);
48    |
49
50 error: literal with an empty format string
51   --> $DIR/write_literal.rs:39:28
52    |
53 LL |     writeln!(v, "{0} {1}", "hello", "world");
54    |                            ^^^^^^^
55    |
56 help: try this
57    |
58 LL -     writeln!(v, "{0} {1}", "hello", "world");
59 LL +     writeln!(v, "hello {1}", "world");
60    |
61
62 error: literal with an empty format string
63   --> $DIR/write_literal.rs:39:37
64    |
65 LL |     writeln!(v, "{0} {1}", "hello", "world");
66    |                                     ^^^^^^^
67    |
68 help: try this
69    |
70 LL -     writeln!(v, "{0} {1}", "hello", "world");
71 LL +     writeln!(v, "{0} world", "hello");
72    |
73
74 error: literal with an empty format string
75   --> $DIR/write_literal.rs:40:37
76    |
77 LL |     writeln!(v, "{1} {0}", "hello", "world");
78    |                                     ^^^^^^^
79    |
80 help: try this
81    |
82 LL -     writeln!(v, "{1} {0}", "hello", "world");
83 LL +     writeln!(v, "world {0}", "hello");
84    |
85
86 error: literal with an empty format string
87   --> $DIR/write_literal.rs:40:28
88    |
89 LL |     writeln!(v, "{1} {0}", "hello", "world");
90    |                            ^^^^^^^
91    |
92 help: try this
93    |
94 LL -     writeln!(v, "{1} {0}", "hello", "world");
95 LL +     writeln!(v, "{1} hello", "world");
96    |
97
98 error: literal with an empty format string
99   --> $DIR/write_literal.rs:43:38
100    |
101 LL |     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
102    |                                      ^^^^^^^
103    |
104 help: try this
105    |
106 LL -     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
107 LL +     writeln!(v, "hello {bar}", bar = "world");
108    |
109
110 error: literal with an empty format string
111   --> $DIR/write_literal.rs:43:53
112    |
113 LL |     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
114    |                                                     ^^^^^^^
115    |
116 help: try this
117    |
118 LL -     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
119 LL +     writeln!(v, "{foo} world", foo = "hello");
120    |
121
122 error: literal with an empty format string
123   --> $DIR/write_literal.rs:44:53
124    |
125 LL |     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
126    |                                                     ^^^^^^^
127    |
128 help: try this
129    |
130 LL -     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
131 LL +     writeln!(v, "world {foo}", foo = "hello");
132    |
133
134 error: literal with an empty format string
135   --> $DIR/write_literal.rs:44:38
136    |
137 LL |     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
138    |                                      ^^^^^^^
139    |
140 help: try this
141    |
142 LL -     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
143 LL +     writeln!(v, "{bar} hello", bar = "world");
144    |
145
146 error: aborting due to 12 previous errors
147