rust/tests/ui/asm/aarch64/parse-error.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

416 lines
14 KiB
Plaintext
Raw Normal View History

2020-02-20 09:19:48 +00:00
error: requires at least a template string argument
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:9:9
2020-02-20 09:19:48 +00:00
|
LL | asm!();
2021-10-14 18:28:28 +00:00
| ^^^^^^
2020-02-20 09:19:48 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:11:14
2020-02-20 09:19:48 +00:00
|
LL | asm!(foo);
| ^^^
error: expected token: `,`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:13:19
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}" foo);
| ^^^ expected `,`
2021-07-29 11:43:26 +00:00
error: expected operand, clobber_abi, options, or additional template string
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:15:20
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", foo);
2021-07-29 11:43:26 +00:00
| ^^^ expected operand, clobber_abi, options, or additional template string
2020-02-20 09:19:48 +00:00
error: expected `(`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:17:23
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", in foo);
| ^^^ expected `(`
error: expected `)`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:19:27
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", in(reg foo));
| ^^^ expected `)`
error: expected expression, found end of macro arguments
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:21:27
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", in(reg));
| ^ expected expression
error: expected register class or explicit register
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:23:26
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", inout(=) foo => bar);
| ^
error: expected expression, found end of macro arguments
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:25:37
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", inout(reg) foo =>);
| ^ expected expression
error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:27:32
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", in(reg) foo => bar);
| ^^ expected one of 7 possible tokens
error: expected a path for argument to `sym`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:29:24
2020-02-20 09:19:48 +00:00
|
LL | asm!("{}", sym foo + bar);
| ^^^^^^^^^
error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:31:26
2020-02-20 09:19:48 +00:00
|
LL | asm!("", options(foo));
| ^^^ expected one of 10 possible tokens
2020-02-20 09:19:48 +00:00
error: expected one of `)` or `,`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:33:32
2020-02-20 09:19:48 +00:00
|
LL | asm!("", options(nomem foo));
| ^^^ expected one of `)` or `,`
error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:35:33
2020-02-20 09:19:48 +00:00
|
LL | asm!("", options(nomem, foo));
| ^^^ expected one of 10 possible tokens
2020-02-20 09:19:48 +00:00
2021-07-29 11:43:26 +00:00
error: expected string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:39:30
2021-07-29 11:43:26 +00:00
|
LL | asm!("", clobber_abi(foo));
| ^^^ not a string literal
2021-10-17 07:30:24 +00:00
error: expected one of `)` or `,`, found `foo`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:41:34
2021-07-29 11:43:26 +00:00
|
LL | asm!("", clobber_abi("C" foo));
2021-10-17 07:30:24 +00:00
| ^^^ expected one of `)` or `,`
2021-07-29 11:43:26 +00:00
2021-10-17 07:30:24 +00:00
error: expected string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:43:35
2021-07-29 11:43:26 +00:00
|
LL | asm!("", clobber_abi("C", foo));
2021-10-17 07:30:24 +00:00
| ^^^ not a string literal
2021-07-29 11:43:26 +00:00
2020-02-20 09:19:48 +00:00
error: duplicate argument named `a`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:50:36
2020-02-20 09:19:48 +00:00
|
LL | asm!("{a}", a = const foo, a = const bar);
| ------------- ^^^^^^^^^^^^^ duplicate argument
| |
| previously here
error: argument never used
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:50:36
2020-02-20 09:19:48 +00:00
|
LL | asm!("{a}", a = const foo, a = const bar);
| ^^^^^^^^^^^^^ argument never used
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
2020-02-20 09:19:48 +00:00
error: explicit register arguments cannot have names
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:55:18
2020-02-20 09:19:48 +00:00
|
LL | asm!("", a = in("x0") foo);
| ^^^^^^^^^^^^^^^^
2020-02-20 09:19:48 +00:00
error: positional arguments cannot follow named arguments or explicit register arguments
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:61:35
2020-02-20 09:19:48 +00:00
|
LL | asm!("{1}", in("x0") foo, const bar);
| ------------ ^^^^^^^^^ positional argument
2020-02-20 09:19:48 +00:00
| |
| explicit register argument
2024-02-25 20:43:06 +00:00
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:64:29
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
|
LL | asm!("", options(), "");
2024-02-25 20:43:06 +00:00
| ^^ expected one of 10 possible tokens
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
2024-02-25 20:43:06 +00:00
error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:66:33
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
|
LL | asm!("{}", in(reg) foo, "{}", out(reg) foo);
2024-02-25 20:43:06 +00:00
| ^^^^ expected one of 10 possible tokens
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:68:14
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
|
LL | asm!(format!("{{{}}}", 0), in(reg) foo);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:70:21
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
|
LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
| ^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
asm: Allow multiple template strings; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands. In order to get srcloc mappings right for macros that generate multi-line string literals, create one line_span for each line in the string literal, each pointing to the macro. Make `rustc_parse_format::Parser::curarg` `pub`, so that we can propagate it from one template string argument to the next.
2020-06-15 06:33:55 +00:00
error: _ cannot be used for input operands
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:72:28
|
LL | asm!("{}", in(reg) _);
| ^
error: _ cannot be used for input operands
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:74:31
|
LL | asm!("{}", inout(reg) _);
| ^
error: _ cannot be used for input operands
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:76:35
|
LL | asm!("{}", inlateout(reg) _);
| ^
2021-04-13 17:11:11 +00:00
error: requires at least a template string argument
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:83:1
2021-04-13 17:11:11 +00:00
|
LL | global_asm!();
2021-10-14 18:28:28 +00:00
| ^^^^^^^^^^^^^
2021-04-13 17:11:11 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:85:13
2021-04-13 17:11:11 +00:00
|
LL | global_asm!(FOO);
| ^^^
error: expected token: `,`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:87:18
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{}" FOO);
| ^^^ expected `,`
error: expected operand, options, or additional template string
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:89:19
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{}", FOO);
| ^^^ expected operand, options, or additional template string
error: expected expression, found end of macro arguments
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:91:24
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{}", const);
| ^ expected expression
error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:93:30
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{}", const(reg) FOO);
| ^^^ expected one of `,`, `.`, `?`, or an operator
error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:95:25
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("", options(FOO));
| ^^^ expected one of `)`, `att_syntax`, or `raw`
2021-04-13 17:11:11 +00:00
2024-07-27 17:08:00 +00:00
error: the `nomem` option cannot be used with `global_asm!`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:97:25
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("", options(nomem FOO));
2024-07-27 17:08:00 +00:00
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
2021-04-13 17:11:11 +00:00
2024-07-27 17:08:00 +00:00
error: expected one of `)` or `,`, found `FOO`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:97:31
2024-07-27 17:08:00 +00:00
|
LL | global_asm!("", options(nomem FOO));
| ^^^ expected one of `)` or `,`
error: the `nomem` option cannot be used with `global_asm!`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:100:25
2024-07-27 17:08:00 +00:00
|
LL | global_asm!("", options(nomem, FOO));
| ^^^^^ the `nomem` option is not meaningful for global-scoped inline assembly
error: expected one of `)`, `att_syntax`, or `raw`, found `FOO`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:100:32
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("", options(nomem, FOO));
2024-07-27 17:08:00 +00:00
| ^^^ expected one of `)`, `att_syntax`, or `raw`
2021-04-13 17:11:11 +00:00
2021-07-29 11:43:26 +00:00
error: expected string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:104:29
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("", clobber_abi(FOO));
| ^^^ not a string literal
2021-10-17 07:30:24 +00:00
error: expected one of `)` or `,`, found `FOO`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:106:33
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("", clobber_abi("C" FOO));
2021-10-17 07:30:24 +00:00
| ^^^ expected one of `)` or `,`
2021-07-29 11:43:26 +00:00
2021-10-17 07:30:24 +00:00
error: expected string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:108:34
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("", clobber_abi("C", FOO));
2021-10-17 07:30:24 +00:00
| ^^^ not a string literal
2021-07-29 11:43:26 +00:00
error: `clobber_abi` cannot be used with `global_asm!`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:110:19
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("{}", clobber_abi("C"), const FOO);
| ^^^^^^^^^^^^^^^^
error: `clobber_abi` cannot be used with `global_asm!`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:112:28
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("", options(), clobber_abi("C"));
| ^^^^^^^^^^^^^^^^
2021-07-29 11:43:26 +00:00
error: `clobber_abi` cannot be used with `global_asm!`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:114:30
2021-07-29 11:43:26 +00:00
|
LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
| ^^^^^^^^^^^^^^^^
2021-07-29 11:43:26 +00:00
2021-04-13 17:11:11 +00:00
error: duplicate argument named `a`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:116:35
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ------------- ^^^^^^^^^^^^^ duplicate argument
| |
| previously here
error: argument never used
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:116:35
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{a}", a = const FOO, a = const BAR);
| ^^^^^^^^^^^^^ argument never used
|
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `""`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:119:28
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("", options(), "");
| ^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
2021-04-13 17:11:11 +00:00
error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"`
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:121:30
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{}", const FOO, "{}", const FOO);
| ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym`
2021-04-13 17:11:11 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:123:13
2021-04-13 17:11:11 +00:00
|
LL | global_asm!(format!("{{{}}}", 0), const FOO);
| ^^^^^^^^^^^^^^^^^^^^
|
2021-05-13 22:09:54 +00:00
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
2021-04-13 17:11:11 +00:00
error: asm template must be a string literal
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:125:20
2021-04-13 17:11:11 +00:00
|
LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
| ^^^^^^^^^^^^^^^^^^^^
|
2021-05-13 22:09:54 +00:00
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
2021-04-13 17:11:11 +00:00
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:37:37
2021-04-06 04:50:55 +00:00
|
LL | asm!("{}", options(), const foo);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const foo: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:45:44
2021-07-29 11:43:26 +00:00
|
LL | asm!("{}", clobber_abi("C"), const foo);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const foo: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-07-29 11:43:26 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:48:55
|
LL | asm!("{}", options(), clobber_abi("C"), const foo);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const foo: /* Type */ = 0;
| ~~~~~ ++++++++++++
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:50:31
2021-04-06 04:50:55 +00:00
|
LL | asm!("{a}", a = const foo, a = const bar);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const foo: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:50:46
2021-04-06 04:50:55 +00:00
|
LL | asm!("{a}", a = const foo, a = const bar);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const bar: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:57:45
2021-04-06 04:50:55 +00:00
|
LL | asm!("{a}", in("x0") foo, a = const bar);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const bar: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:59:45
2021-04-06 04:50:55 +00:00
|
LL | asm!("{a}", in("x0") foo, a = const bar);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const bar: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
error[E0435]: attempt to use a non-constant value in a constant
2024-08-10 16:13:03 +00:00
--> $DIR/parse-error.rs:61:41
2021-04-06 04:50:55 +00:00
|
LL | asm!("{1}", in("x0") foo, const bar);
| ^^^ non-constant value
2024-07-09 17:27:08 +00:00
|
help: consider using `const` instead of `let`
|
LL | const bar: /* Type */ = 0;
| ~~~~~ ++++++++++++
2021-04-06 04:50:55 +00:00
2024-07-27 17:08:00 +00:00
error: aborting due to 59 previous errors
2020-02-20 09:19:48 +00:00
2021-04-06 04:50:55 +00:00
For more information about this error, try `rustc --explain E0435`.