]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error: 1 positional argument in format string, but no arguments were given |
0731742a | 2 | --> $DIR/ifmt-bad-arg.rs:6:14 |
8faf50e0 XL |
3 | | |
4 | LL | format!("{}"); | |
5 | | ^^ | |
6 | ||
7 | error: invalid reference to positional argument 1 (there is 1 argument) | |
0731742a | 8 | --> $DIR/ifmt-bad-arg.rs:9:14 |
8faf50e0 XL |
9 | | |
10 | LL | format!("{1}", 1); | |
11 | | ^^^ | |
12 | | | |
13 | = note: positional arguments are zero-based | |
14 | ||
15 | error: argument never used | |
0731742a | 16 | --> $DIR/ifmt-bad-arg.rs:9:20 |
8faf50e0 XL |
17 | | |
18 | LL | format!("{1}", 1); | |
0731742a | 19 | | ----- ^ argument never used |
8faf50e0 XL |
20 | | | |
21 | | formatting specifier missing | |
22 | ||
23 | error: 2 positional arguments in format string, but no arguments were given | |
0731742a | 24 | --> $DIR/ifmt-bad-arg.rs:13:14 |
8faf50e0 XL |
25 | | |
26 | LL | format!("{} {}"); | |
27 | | ^^ ^^ | |
28 | ||
29 | error: invalid reference to positional argument 1 (there is 1 argument) | |
0731742a | 30 | --> $DIR/ifmt-bad-arg.rs:16:18 |
8faf50e0 XL |
31 | | |
32 | LL | format!("{0} {1}", 1); | |
33 | | ^^^ | |
34 | | | |
35 | = note: positional arguments are zero-based | |
36 | ||
37 | error: invalid reference to positional argument 2 (there are 2 arguments) | |
0731742a | 38 | --> $DIR/ifmt-bad-arg.rs:19:22 |
8faf50e0 XL |
39 | | |
40 | LL | format!("{0} {1} {2}", 1, 2); | |
41 | | ^^^ | |
42 | | | |
43 | = note: positional arguments are zero-based | |
44 | ||
45 | error: invalid reference to positional argument 2 (there are 2 arguments) | |
0731742a | 46 | --> $DIR/ifmt-bad-arg.rs:22:28 |
8faf50e0 XL |
47 | | |
48 | LL | format!("{} {value} {} {}", 1, value=2); | |
49 | | ^^ | |
50 | | | |
51 | = note: positional arguments are zero-based | |
52 | ||
53 | error: invalid reference to positional arguments 3, 4 and 5 (there are 3 arguments) | |
0731742a | 54 | --> $DIR/ifmt-bad-arg.rs:24:38 |
8faf50e0 XL |
55 | | |
56 | LL | format!("{name} {value} {} {} {} {} {} {}", 0, name=1, value=2); | |
57 | | ^^ ^^ ^^ | |
58 | | | |
59 | = note: positional arguments are zero-based | |
60 | ||
61 | error: there is no argument named `foo` | |
0731742a | 62 | --> $DIR/ifmt-bad-arg.rs:27:17 |
8faf50e0 XL |
63 | | |
64 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | |
65 | | ^^^^^ | |
66 | ||
67 | error: there is no argument named `bar` | |
0731742a | 68 | --> $DIR/ifmt-bad-arg.rs:27:26 |
8faf50e0 XL |
69 | | |
70 | LL | format!("{} {foo} {} {bar} {}", 1, 2, 3); | |
71 | | ^^^^^ | |
72 | ||
73 | error: there is no argument named `foo` | |
0731742a | 74 | --> $DIR/ifmt-bad-arg.rs:31:14 |
8faf50e0 | 75 | | |
532ac7d7 | 76 | LL | format!("{foo}"); |
8faf50e0 XL |
77 | | ^^^^^ |
78 | ||
79 | error: multiple unused formatting arguments | |
0731742a | 80 | --> $DIR/ifmt-bad-arg.rs:32:17 |
8faf50e0 | 81 | | |
532ac7d7 | 82 | LL | format!("", 1, 2); |
0731742a XL |
83 | | -- ^ ^ argument never used |
84 | | | | | |
85 | | | argument never used | |
8faf50e0 XL |
86 | | multiple missing formatting specifiers |
87 | ||
88 | error: argument never used | |
0731742a | 89 | --> $DIR/ifmt-bad-arg.rs:33:22 |
8faf50e0 | 90 | | |
532ac7d7 | 91 | LL | format!("{}", 1, 2); |
0731742a | 92 | | ---- ^ argument never used |
8faf50e0 XL |
93 | | | |
94 | | formatting specifier missing | |
95 | ||
96 | error: argument never used | |
0731742a | 97 | --> $DIR/ifmt-bad-arg.rs:34:20 |
8faf50e0 | 98 | | |
532ac7d7 | 99 | LL | format!("{1}", 1, 2); |
0731742a | 100 | | ----- ^ argument never used |
8faf50e0 XL |
101 | | | |
102 | | formatting specifier missing | |
103 | ||
104 | error: named argument never used | |
0731742a | 105 | --> $DIR/ifmt-bad-arg.rs:35:26 |
8faf50e0 | 106 | | |
532ac7d7 | 107 | LL | format!("{}", 1, foo=2); |
0731742a | 108 | | ---- ^ named argument never used |
8faf50e0 XL |
109 | | | |
110 | | formatting specifier missing | |
111 | ||
112 | error: argument never used | |
0731742a | 113 | --> $DIR/ifmt-bad-arg.rs:36:22 |
8faf50e0 | 114 | | |
532ac7d7 | 115 | LL | format!("{foo}", 1, foo=2); |
0731742a | 116 | | ------- ^ argument never used |
8faf50e0 XL |
117 | | | |
118 | | formatting specifier missing | |
119 | ||
120 | error: named argument never used | |
0731742a | 121 | --> $DIR/ifmt-bad-arg.rs:37:21 |
8faf50e0 | 122 | | |
532ac7d7 | 123 | LL | format!("", foo=2); |
0731742a | 124 | | -- ^ named argument never used |
8faf50e0 XL |
125 | | | |
126 | | formatting specifier missing | |
127 | ||
128 | error: multiple unused formatting arguments | |
0731742a | 129 | --> $DIR/ifmt-bad-arg.rs:38:32 |
8faf50e0 | 130 | | |
532ac7d7 | 131 | LL | format!("{} {}", 1, 2, foo=1, bar=2); |
0731742a XL |
132 | | ------- ^ ^ named argument never used |
133 | | | | | |
134 | | | named argument never used | |
8faf50e0 XL |
135 | | multiple missing formatting specifiers |
136 | ||
137 | error: duplicate argument named `foo` | |
0731742a | 138 | --> $DIR/ifmt-bad-arg.rs:40:33 |
8faf50e0 | 139 | | |
532ac7d7 | 140 | LL | format!("{foo}", foo=1, foo=2); |
8faf50e0 XL |
141 | | ^ |
142 | | | |
143 | note: previously here | |
0731742a | 144 | --> $DIR/ifmt-bad-arg.rs:40:26 |
8faf50e0 | 145 | | |
532ac7d7 | 146 | LL | format!("{foo}", foo=1, foo=2); |
8faf50e0 XL |
147 | | ^ |
148 | ||
149 | error: expected ident, positional arguments cannot follow named arguments | |
0731742a | 150 | --> $DIR/ifmt-bad-arg.rs:41:24 |
8faf50e0 | 151 | | |
532ac7d7 | 152 | LL | format!("", foo=1, 2); |
8faf50e0 XL |
153 | | ^ |
154 | ||
155 | error: there is no argument named `valueb` | |
0731742a | 156 | --> $DIR/ifmt-bad-arg.rs:45:23 |
8faf50e0 XL |
157 | | |
158 | LL | format!("{valuea} {valueb}", valuea=5, valuec=7); | |
159 | | ^^^^^^^^ | |
160 | ||
161 | error: named argument never used | |
0731742a | 162 | --> $DIR/ifmt-bad-arg.rs:45:51 |
8faf50e0 XL |
163 | | |
164 | LL | format!("{valuea} {valueb}", valuea=5, valuec=7); | |
0731742a | 165 | | ------------------- ^ named argument never used |
8faf50e0 XL |
166 | | | |
167 | | formatting specifier missing | |
168 | ||
169 | error: invalid format string: expected `'}'` but string was terminated | |
0731742a | 170 | --> $DIR/ifmt-bad-arg.rs:51:15 |
8faf50e0 | 171 | | |
532ac7d7 | 172 | LL | format!("{"); |
0731742a XL |
173 | | -^ expected `'}'` in format string |
174 | | | | |
175 | | because of this opening brace | |
8faf50e0 XL |
176 | | |
177 | = note: if you intended to print `{`, you can escape it using `{{` | |
178 | ||
179 | error: invalid format string: unmatched `}` found | |
0731742a | 180 | --> $DIR/ifmt-bad-arg.rs:53:18 |
8faf50e0 | 181 | | |
532ac7d7 | 182 | LL | format!("foo } bar"); |
8faf50e0 XL |
183 | | ^ unmatched `}` in format string |
184 | | | |
185 | = note: if you intended to print `}`, you can escape it using `}}` | |
186 | ||
187 | error: invalid format string: unmatched `}` found | |
0731742a | 188 | --> $DIR/ifmt-bad-arg.rs:54:18 |
8faf50e0 | 189 | | |
532ac7d7 | 190 | LL | format!("foo }"); |
8faf50e0 XL |
191 | | ^ unmatched `}` in format string |
192 | | | |
193 | = note: if you intended to print `}`, you can escape it using `}}` | |
194 | ||
195 | error: argument never used | |
0731742a | 196 | --> $DIR/ifmt-bad-arg.rs:56:27 |
8faf50e0 | 197 | | |
532ac7d7 | 198 | LL | format!("foo %s baz", "bar"); |
0731742a | 199 | | -- ^^^^^ argument never used |
8faf50e0 XL |
200 | | | |
201 | | help: format specifiers use curly braces: `{}` | |
202 | | | |
203 | = note: printf formatting not supported; see the documentation for `std::fmt` | |
204 | ||
205 | error: there is no argument named `foo` | |
0731742a | 206 | --> $DIR/ifmt-bad-arg.rs:60:9 |
8faf50e0 XL |
207 | | |
208 | LL | {foo} | |
209 | | ^^^^^ | |
210 | ||
0bf4aa26 | 211 | error: invalid format string: expected `'}'`, found `'t'` |
0731742a | 212 | --> $DIR/ifmt-bad-arg.rs:75:1 |
0bf4aa26 | 213 | | |
0731742a XL |
214 | LL | ninth number: { |
215 | | - because of this opening brace | |
0bf4aa26 XL |
216 | LL | tenth number: {}", |
217 | | ^ expected `}` in format string | |
0731742a XL |
218 | | |
219 | = note: if you intended to print `{`, you can escape it using `{{` | |
0bf4aa26 XL |
220 | |
221 | error: aborting due to 28 previous errors | |
8faf50e0 | 222 |