]>
Commit | Line | Data |
---|---|---|
f9f354fc | 1 | error: requires at least a template string argument |
a2a8927a | 2 | --> $DIR/parse-error.rs:11:9 |
f9f354fc XL |
3 | | |
4 | LL | asm!(); | |
c295e0f8 | 5 | | ^^^^^^ |
f9f354fc XL |
6 | |
7 | error: asm template must be a string literal | |
a2a8927a | 8 | --> $DIR/parse-error.rs:13:14 |
f9f354fc XL |
9 | | |
10 | LL | asm!(foo); | |
11 | | ^^^ | |
12 | ||
13 | error: expected token: `,` | |
a2a8927a | 14 | --> $DIR/parse-error.rs:15:19 |
f9f354fc XL |
15 | | |
16 | LL | asm!("{}" foo); | |
17 | | ^^^ expected `,` | |
18 | ||
94222f64 | 19 | error: expected operand, clobber_abi, options, or additional template string |
a2a8927a | 20 | --> $DIR/parse-error.rs:17:20 |
f9f354fc XL |
21 | | |
22 | LL | asm!("{}", foo); | |
94222f64 | 23 | | ^^^ expected operand, clobber_abi, options, or additional template string |
f9f354fc XL |
24 | |
25 | error: expected `(`, found `foo` | |
a2a8927a | 26 | --> $DIR/parse-error.rs:19:23 |
f9f354fc XL |
27 | | |
28 | LL | asm!("{}", in foo); | |
29 | | ^^^ expected `(` | |
30 | ||
31 | error: expected `)`, found `foo` | |
a2a8927a | 32 | --> $DIR/parse-error.rs:21:27 |
f9f354fc XL |
33 | | |
34 | LL | asm!("{}", in(reg foo)); | |
35 | | ^^^ expected `)` | |
36 | ||
37 | error: expected expression, found end of macro arguments | |
a2a8927a | 38 | --> $DIR/parse-error.rs:23:27 |
f9f354fc XL |
39 | | |
40 | LL | asm!("{}", in(reg)); | |
41 | | ^ expected expression | |
42 | ||
43 | error: expected register class or explicit register | |
a2a8927a | 44 | --> $DIR/parse-error.rs:25:26 |
f9f354fc XL |
45 | | |
46 | LL | asm!("{}", inout(=) foo => bar); | |
47 | | ^ | |
48 | ||
49 | error: expected expression, found end of macro arguments | |
a2a8927a | 50 | --> $DIR/parse-error.rs:27:37 |
f9f354fc XL |
51 | | |
52 | LL | asm!("{}", inout(reg) foo =>); | |
53 | | ^ expected expression | |
54 | ||
55 | error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>` | |
a2a8927a | 56 | --> $DIR/parse-error.rs:29:32 |
f9f354fc XL |
57 | | |
58 | LL | asm!("{}", in(reg) foo => bar); | |
59 | | ^^ expected one of 7 possible tokens | |
60 | ||
04454e1e | 61 | error: expected a path for argument to `sym` |
a2a8927a | 62 | --> $DIR/parse-error.rs:31:24 |
f9f354fc XL |
63 | | |
64 | LL | asm!("{}", sym foo + bar); | |
65 | | ^^^^^^^^^ | |
66 | ||
a2a8927a XL |
67 | error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` |
68 | --> $DIR/parse-error.rs:33:26 | |
f9f354fc XL |
69 | | |
70 | LL | asm!("", options(foo)); | |
a2a8927a | 71 | | ^^^ expected one of 10 possible tokens |
f9f354fc XL |
72 | |
73 | error: expected one of `)` or `,`, found `foo` | |
a2a8927a | 74 | --> $DIR/parse-error.rs:35:32 |
f9f354fc XL |
75 | | |
76 | LL | asm!("", options(nomem foo)); | |
77 | | ^^^ expected one of `)` or `,` | |
78 | ||
a2a8927a XL |
79 | error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo` |
80 | --> $DIR/parse-error.rs:37:33 | |
f9f354fc XL |
81 | | |
82 | LL | asm!("", options(nomem, foo)); | |
a2a8927a | 83 | | ^^^ expected one of 10 possible tokens |
f9f354fc | 84 | |
3c0e092e | 85 | error: at least one abi must be provided as an argument to `clobber_abi` |
353b0b11 | 86 | --> $DIR/parse-error.rs:41:30 |
94222f64 | 87 | | |
3c0e092e XL |
88 | LL | asm!("", clobber_abi()); |
89 | | ^ | |
90 | ||
91 | error: expected string literal | |
353b0b11 | 92 | --> $DIR/parse-error.rs:43:30 |
3c0e092e | 93 | | |
94222f64 XL |
94 | LL | asm!("", clobber_abi(foo)); |
95 | | ^^^ not a string literal | |
96 | ||
3c0e092e | 97 | error: expected one of `)` or `,`, found `foo` |
353b0b11 | 98 | --> $DIR/parse-error.rs:45:34 |
94222f64 XL |
99 | | |
100 | LL | asm!("", clobber_abi("C" foo)); | |
3c0e092e | 101 | | ^^^ expected one of `)` or `,` |
94222f64 | 102 | |
3c0e092e | 103 | error: expected string literal |
353b0b11 | 104 | --> $DIR/parse-error.rs:47:35 |
94222f64 XL |
105 | | |
106 | LL | asm!("", clobber_abi("C", foo)); | |
3c0e092e | 107 | | ^^^ not a string literal |
94222f64 | 108 | |
f9f354fc | 109 | error: duplicate argument named `a` |
353b0b11 | 110 | --> $DIR/parse-error.rs:54:36 |
f9f354fc XL |
111 | | |
112 | LL | asm!("{a}", a = const foo, a = const bar); | |
113 | | ------------- ^^^^^^^^^^^^^ duplicate argument | |
114 | | | | |
115 | | previously here | |
116 | ||
117 | error: argument never used | |
353b0b11 | 118 | --> $DIR/parse-error.rs:54:36 |
f9f354fc XL |
119 | | |
120 | LL | asm!("{a}", a = const foo, a = const bar); | |
121 | | ^^^^^^^^^^^^^ argument never used | |
f035d41b XL |
122 | | |
123 | = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"` | |
f9f354fc XL |
124 | |
125 | error: explicit register arguments cannot have names | |
353b0b11 | 126 | --> $DIR/parse-error.rs:59:18 |
f9f354fc XL |
127 | | |
128 | LL | asm!("", a = in("eax") foo); | |
129 | | ^^^^^^^^^^^^^^^^^ | |
130 | ||
f9f354fc | 131 | error: positional arguments cannot follow named arguments or explicit register arguments |
353b0b11 | 132 | --> $DIR/parse-error.rs:65:36 |
f9f354fc XL |
133 | | |
134 | LL | asm!("{1}", in("eax") foo, const bar); | |
135 | | ------------- ^^^^^^^^^ positional argument | |
136 | | | | |
137 | | explicit register argument | |
138 | ||
94222f64 | 139 | error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""` |
353b0b11 | 140 | --> $DIR/parse-error.rs:68:29 |
f035d41b XL |
141 | | |
142 | LL | asm!("", options(), ""); | |
94222f64 | 143 | | ^^ expected one of 9 possible tokens |
f035d41b | 144 | |
94222f64 | 145 | error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"` |
353b0b11 | 146 | --> $DIR/parse-error.rs:70:33 |
f035d41b XL |
147 | | |
148 | LL | asm!("{}", in(reg) foo, "{}", out(reg) foo); | |
94222f64 | 149 | | ^^^^ expected one of 9 possible tokens |
f035d41b XL |
150 | |
151 | error: asm template must be a string literal | |
353b0b11 | 152 | --> $DIR/parse-error.rs:72:14 |
f035d41b XL |
153 | | |
154 | LL | asm!(format!("{{{}}}", 0), in(reg) foo); | |
155 | | ^^^^^^^^^^^^^^^^^^^^ | |
156 | | | |
17df50a5 | 157 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) |
f035d41b XL |
158 | |
159 | error: asm template must be a string literal | |
353b0b11 | 160 | --> $DIR/parse-error.rs:74:21 |
f035d41b XL |
161 | | |
162 | LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar); | |
163 | | ^^^^^^^^^^^^^^^^^^^^ | |
164 | | | |
17df50a5 XL |
165 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) |
166 | ||
c295e0f8 | 167 | error: _ cannot be used for input operands |
353b0b11 | 168 | --> $DIR/parse-error.rs:76:28 |
c295e0f8 XL |
169 | | |
170 | LL | asm!("{}", in(reg) _); | |
171 | | ^ | |
172 | ||
173 | error: _ cannot be used for input operands | |
353b0b11 | 174 | --> $DIR/parse-error.rs:78:31 |
c295e0f8 XL |
175 | | |
176 | LL | asm!("{}", inout(reg) _); | |
177 | | ^ | |
178 | ||
179 | error: _ cannot be used for input operands | |
353b0b11 | 180 | --> $DIR/parse-error.rs:80:35 |
c295e0f8 XL |
181 | | |
182 | LL | asm!("{}", inlateout(reg) _); | |
183 | | ^ | |
184 | ||
17df50a5 | 185 | error: requires at least a template string argument |
353b0b11 | 186 | --> $DIR/parse-error.rs:87:1 |
17df50a5 XL |
187 | | |
188 | LL | global_asm!(); | |
c295e0f8 | 189 | | ^^^^^^^^^^^^^ |
17df50a5 XL |
190 | |
191 | error: asm template must be a string literal | |
353b0b11 | 192 | --> $DIR/parse-error.rs:89:13 |
17df50a5 XL |
193 | | |
194 | LL | global_asm!(FOO); | |
195 | | ^^^ | |
196 | ||
197 | error: expected token: `,` | |
353b0b11 | 198 | --> $DIR/parse-error.rs:91:18 |
17df50a5 XL |
199 | | |
200 | LL | global_asm!("{}" FOO); | |
201 | | ^^^ expected `,` | |
202 | ||
203 | error: expected operand, options, or additional template string | |
353b0b11 | 204 | --> $DIR/parse-error.rs:93:19 |
17df50a5 XL |
205 | | |
206 | LL | global_asm!("{}", FOO); | |
207 | | ^^^ expected operand, options, or additional template string | |
208 | ||
209 | error: expected expression, found end of macro arguments | |
353b0b11 | 210 | --> $DIR/parse-error.rs:95:24 |
17df50a5 XL |
211 | | |
212 | LL | global_asm!("{}", const); | |
213 | | ^ expected expression | |
214 | ||
215 | error: expected one of `,`, `.`, `?`, or an operator, found `FOO` | |
353b0b11 | 216 | --> $DIR/parse-error.rs:97:30 |
17df50a5 XL |
217 | | |
218 | LL | global_asm!("{}", const(reg) FOO); | |
219 | | ^^^ expected one of `,`, `.`, `?`, or an operator | |
220 | ||
064997fb | 221 | error: expected one of `)`, `att_syntax`, or `raw`, found `FOO` |
353b0b11 | 222 | --> $DIR/parse-error.rs:99:25 |
17df50a5 XL |
223 | | |
224 | LL | global_asm!("", options(FOO)); | |
064997fb | 225 | | ^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 | 226 | |
064997fb | 227 | error: expected one of `)`, `att_syntax`, or `raw`, found `nomem` |
353b0b11 | 228 | --> $DIR/parse-error.rs:101:25 |
17df50a5 XL |
229 | | |
230 | LL | global_asm!("", options(nomem FOO)); | |
064997fb | 231 | | ^^^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 | 232 | |
064997fb | 233 | error: expected one of `)`, `att_syntax`, or `raw`, found `nomem` |
353b0b11 | 234 | --> $DIR/parse-error.rs:103:25 |
17df50a5 XL |
235 | | |
236 | LL | global_asm!("", options(nomem, FOO)); | |
064997fb | 237 | | ^^^^^ expected one of `)`, `att_syntax`, or `raw` |
17df50a5 | 238 | |
94222f64 | 239 | error: expected string literal |
353b0b11 | 240 | --> $DIR/parse-error.rs:106:29 |
94222f64 XL |
241 | | |
242 | LL | global_asm!("", clobber_abi(FOO)); | |
243 | | ^^^ not a string literal | |
244 | ||
3c0e092e | 245 | error: expected one of `)` or `,`, found `FOO` |
353b0b11 | 246 | --> $DIR/parse-error.rs:108:33 |
94222f64 XL |
247 | | |
248 | LL | global_asm!("", clobber_abi("C" FOO)); | |
3c0e092e | 249 | | ^^^ expected one of `)` or `,` |
94222f64 | 250 | |
3c0e092e | 251 | error: expected string literal |
353b0b11 | 252 | --> $DIR/parse-error.rs:110:34 |
94222f64 XL |
253 | | |
254 | LL | global_asm!("", clobber_abi("C", FOO)); | |
3c0e092e | 255 | | ^^^ not a string literal |
94222f64 | 256 | |
94222f64 | 257 | error: `clobber_abi` cannot be used with `global_asm!` |
353b0b11 | 258 | --> $DIR/parse-error.rs:112:19 |
94222f64 XL |
259 | | |
260 | LL | global_asm!("{}", clobber_abi("C"), const FOO); | |
261 | | ^^^^^^^^^^^^^^^^ | |
262 | ||
353b0b11 FG |
263 | error: `clobber_abi` cannot be used with `global_asm!` |
264 | --> $DIR/parse-error.rs:114:28 | |
94222f64 XL |
265 | | |
266 | LL | global_asm!("", options(), clobber_abi("C")); | |
353b0b11 | 267 | | ^^^^^^^^^^^^^^^^ |
94222f64 | 268 | |
353b0b11 FG |
269 | error: `clobber_abi` cannot be used with `global_asm!` |
270 | --> $DIR/parse-error.rs:116:30 | |
94222f64 XL |
271 | | |
272 | LL | global_asm!("{}", options(), clobber_abi("C"), const FOO); | |
353b0b11 | 273 | | ^^^^^^^^^^^^^^^^ |
94222f64 | 274 | |
3c0e092e | 275 | error: `clobber_abi` cannot be used with `global_asm!` |
353b0b11 | 276 | --> $DIR/parse-error.rs:118:17 |
94222f64 XL |
277 | | |
278 | LL | global_asm!("", clobber_abi("C"), clobber_abi("C")); | |
3c0e092e | 279 | | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ |
94222f64 | 280 | |
17df50a5 | 281 | error: duplicate argument named `a` |
353b0b11 | 282 | --> $DIR/parse-error.rs:120:35 |
17df50a5 XL |
283 | | |
284 | LL | global_asm!("{a}", a = const FOO, a = const BAR); | |
285 | | ------------- ^^^^^^^^^^^^^ duplicate argument | |
286 | | | | |
287 | | previously here | |
288 | ||
289 | error: argument never used | |
353b0b11 | 290 | --> $DIR/parse-error.rs:120:35 |
17df50a5 XL |
291 | | |
292 | LL | global_asm!("{a}", a = const FOO, a = const BAR); | |
293 | | ^^^^^^^^^^^^^ argument never used | |
294 | | | |
295 | = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"` | |
296 | ||
04454e1e | 297 | error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""` |
353b0b11 | 298 | --> $DIR/parse-error.rs:123:28 |
17df50a5 XL |
299 | | |
300 | LL | global_asm!("", options(), ""); | |
04454e1e | 301 | | ^^ expected one of `clobber_abi`, `const`, `options`, or `sym` |
17df50a5 | 302 | |
04454e1e | 303 | error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"` |
353b0b11 | 304 | --> $DIR/parse-error.rs:125:30 |
17df50a5 XL |
305 | | |
306 | LL | global_asm!("{}", const FOO, "{}", const FOO); | |
04454e1e | 307 | | ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym` |
17df50a5 XL |
308 | |
309 | error: asm template must be a string literal | |
353b0b11 | 310 | --> $DIR/parse-error.rs:127:13 |
17df50a5 XL |
311 | | |
312 | LL | global_asm!(format!("{{{}}}", 0), const FOO); | |
313 | | ^^^^^^^^^^^^^^^^^^^^ | |
314 | | | |
315 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) | |
316 | ||
317 | error: asm template must be a string literal | |
353b0b11 | 318 | --> $DIR/parse-error.rs:129:20 |
17df50a5 XL |
319 | | |
320 | LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR); | |
321 | | ^^^^^^^^^^^^^^^^^^^^ | |
322 | | | |
323 | = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) | |
f035d41b | 324 | |
cdc7bbd5 | 325 | error[E0435]: attempt to use a non-constant value in a constant |
a2a8927a | 326 | --> $DIR/parse-error.rs:39:37 |
cdc7bbd5 XL |
327 | | |
328 | LL | let mut foo = 0; | |
5099ac24 | 329 | | ----------- help: consider using `const` instead of `let`: `const foo` |
cdc7bbd5 XL |
330 | ... |
331 | LL | asm!("{}", options(), const foo); | |
332 | | ^^^ non-constant value | |
333 | ||
334 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 | 335 | --> $DIR/parse-error.rs:49:44 |
94222f64 XL |
336 | | |
337 | LL | let mut foo = 0; | |
5099ac24 | 338 | | ----------- help: consider using `const` instead of `let`: `const foo` |
94222f64 XL |
339 | ... |
340 | LL | asm!("{}", clobber_abi("C"), const foo); | |
341 | | ^^^ non-constant value | |
342 | ||
343 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 FG |
344 | --> $DIR/parse-error.rs:52:55 |
345 | | | |
346 | LL | let mut foo = 0; | |
347 | | ----------- help: consider using `const` instead of `let`: `const foo` | |
348 | ... | |
349 | LL | asm!("{}", options(), clobber_abi("C"), const foo); | |
350 | | ^^^ non-constant value | |
351 | ||
352 | error[E0435]: attempt to use a non-constant value in a constant | |
353 | --> $DIR/parse-error.rs:54:31 | |
cdc7bbd5 XL |
354 | | |
355 | LL | let mut foo = 0; | |
5099ac24 | 356 | | ----------- help: consider using `const` instead of `let`: `const foo` |
cdc7bbd5 XL |
357 | ... |
358 | LL | asm!("{a}", a = const foo, a = const bar); | |
359 | | ^^^ non-constant value | |
360 | ||
361 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 | 362 | --> $DIR/parse-error.rs:54:46 |
cdc7bbd5 XL |
363 | | |
364 | LL | let mut bar = 0; | |
5099ac24 | 365 | | ----------- help: consider using `const` instead of `let`: `const bar` |
cdc7bbd5 XL |
366 | ... |
367 | LL | asm!("{a}", a = const foo, a = const bar); | |
368 | | ^^^ non-constant value | |
369 | ||
370 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 | 371 | --> $DIR/parse-error.rs:61:46 |
cdc7bbd5 XL |
372 | | |
373 | LL | let mut bar = 0; | |
5099ac24 | 374 | | ----------- help: consider using `const` instead of `let`: `const bar` |
cdc7bbd5 XL |
375 | ... |
376 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
377 | | ^^^ non-constant value | |
378 | ||
379 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 | 380 | --> $DIR/parse-error.rs:63:46 |
cdc7bbd5 XL |
381 | | |
382 | LL | let mut bar = 0; | |
5099ac24 | 383 | | ----------- help: consider using `const` instead of `let`: `const bar` |
cdc7bbd5 XL |
384 | ... |
385 | LL | asm!("{a}", in("eax") foo, a = const bar); | |
386 | | ^^^ non-constant value | |
387 | ||
388 | error[E0435]: attempt to use a non-constant value in a constant | |
353b0b11 | 389 | --> $DIR/parse-error.rs:65:42 |
cdc7bbd5 XL |
390 | | |
391 | LL | let mut bar = 0; | |
5099ac24 | 392 | | ----------- help: consider using `const` instead of `let`: `const bar` |
cdc7bbd5 XL |
393 | ... |
394 | LL | asm!("{1}", in("eax") foo, const bar); | |
395 | | ^^^ non-constant value | |
396 | ||
353b0b11 | 397 | error: aborting due to 59 previous errors |
f9f354fc | 398 | |
cdc7bbd5 | 399 | For more information about this error, try `rustc --explain E0435`. |