]> git.lizzy.rs Git - rust.git/blob - tests/ui/write_literal.stderr
bless clippy tests
[rust.git] / tests / ui / write_literal.stderr
1 error: literal with an empty format string
2   --> $DIR/write_literal.rs:30: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:31: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:32: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:37:28
40    |
41 LL |     writeln!(v, "{0} {1}", "hello", "world");
42    |                            ^^^^^^^
43    |
44 help: try this
45    |
46 LL -     writeln!(v, "{0} {1}", "hello", "world");
47 LL +     writeln!(v, "hello {1}", "world");
48    |
49
50 error: literal with an empty format string
51   --> $DIR/write_literal.rs:37:37
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, "{0} world", "hello");
60    |
61
62 error: literal with an empty format string
63   --> $DIR/write_literal.rs:38:28
64    |
65 LL |     writeln!(v, "{1} {0}", "hello", "world");
66    |                            ^^^^^^^
67    |
68 help: try this
69    |
70 LL -     writeln!(v, "{1} {0}", "hello", "world");
71 LL +     writeln!(v, "{1} hello", "world");
72    |
73
74 error: literal with an empty format string
75   --> $DIR/write_literal.rs:38: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:41:32
88    |
89 LL |     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
90    |                                ^^^^^^^^^^^^^
91    |
92 help: try this
93    |
94 LL -     writeln!(v, "{foo} {bar}", foo = "hello", bar = "world");
95 LL +     writeln!(v, "hello {bar}", bar = "world");
96    |
97
98 error: literal with an empty format string
99   --> $DIR/write_literal.rs:41:47
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, "{foo} world", foo = "hello");
108    |
109
110 error: literal with an empty format string
111   --> $DIR/write_literal.rs:42:32
112    |
113 LL |     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
114    |                                ^^^^^^^^^^^^^
115    |
116 help: try this
117    |
118 LL -     writeln!(v, "{bar} {foo}", foo = "hello", bar = "world");
119 LL +     writeln!(v, "{bar} hello", bar = "world");
120    |
121
122 error: literal with an empty format string
123   --> $DIR/write_literal.rs:42:47
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: aborting due to 11 previous errors
135