diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-05-05 15:24:14 +0200 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-05-27 09:44:10 +0200 |
| commit | c7c0194d980cbb812a61e369b8f92faf75b12f8e (patch) | |
| tree | 47cde91d39ba9127937769633bb1ebc05919ecad /tests/ui/asm | |
| parent | e3bbbeeafd159b9cb7b000950420a20d8910fd5e (diff) | |
| download | rust-c7c0194d980cbb812a61e369b8f92faf75b12f8e.tar.gz rust-c7c0194d980cbb812a61e369b8f92faf75b12f8e.zip | |
move asm parsing code into `rustc_parse`
Diffstat (limited to 'tests/ui/asm')
| -rw-r--r-- | tests/ui/asm/cfg-parse-error.rs | 5 | ||||
| -rw-r--r-- | tests/ui/asm/cfg-parse-error.stderr | 19 | ||||
| -rw-r--r-- | tests/ui/asm/parse-error.stderr | 16 |
3 files changed, 22 insertions, 18 deletions
diff --git a/tests/ui/asm/cfg-parse-error.rs b/tests/ui/asm/cfg-parse-error.rs index c66a627ca94..9b79d16a76d 100644 --- a/tests/ui/asm/cfg-parse-error.rs +++ b/tests/ui/asm/cfg-parse-error.rs @@ -14,7 +14,7 @@ fn main() { #[cfg(false)] a = out(reg) x, "", - //~^ ERROR expected one of `clobber_abi`, `const` + //~^ ERROR expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` ); asm!( #[cfg(false)] @@ -23,7 +23,8 @@ fn main() { const { 5 }, - "", //~ ERROR expected one of `clobber_abi`, `const` + "", + //~^ ERROR expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` ); asm!( diff --git a/tests/ui/asm/cfg-parse-error.stderr b/tests/ui/asm/cfg-parse-error.stderr index 19c76adee63..8a70d39a43d 100644 --- a/tests/ui/asm/cfg-parse-error.stderr +++ b/tests/ui/asm/cfg-parse-error.stderr @@ -1,36 +1,39 @@ -error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` +error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` --> $DIR/cfg-parse-error.rs:16:13 | LL | a = out(reg) x, - | - expected one of 10 possible tokens + | - expected one of 11 possible tokens LL | "", | ^^ unexpected token -error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` +error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` --> $DIR/cfg-parse-error.rs:26:13 | LL | }, - | - expected one of 10 possible tokens + | - expected one of 11 possible tokens LL | "", | ^^ unexpected token error: expected token: `,` - --> $DIR/cfg-parse-error.rs:40:26 + --> $DIR/cfg-parse-error.rs:41:26 | LL | a = out(reg) x, | ^ expected `,` error: this attribute is not supported on assembly - --> $DIR/cfg-parse-error.rs:46:13 + --> $DIR/cfg-parse-error.rs:47:13 | LL | #[rustfmt::skip] | ^^^^^^^^^^^^^^^^ -error: this attribute is not supported on assembly - --> $DIR/cfg-parse-error.rs:52:13 +error: an inner attribute is not permitted in this context + --> $DIR/cfg-parse-error.rs:53:13 | LL | #![rustfmt::skip] | ^^^^^^^^^^^^^^^^^ + | + = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files + = note: outer attributes, like `#[test]`, annotate the item following them error: aborting due to 5 previous errors diff --git a/tests/ui/asm/parse-error.stderr b/tests/ui/asm/parse-error.stderr index 0bba1fd8d9b..dff85a601b7 100644 --- a/tests/ui/asm/parse-error.stderr +++ b/tests/ui/asm/parse-error.stderr @@ -176,17 +176,17 @@ LL | asm!("{a}", a = const foo, a = const bar); | = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"` -error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` +error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `""` --> $DIR/parse-error.rs:80:29 | LL | asm!("", options(), ""); - | ^^ expected one of 10 possible tokens + | ^^ expected one of 11 possible tokens -error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"` +error: expected one of `#`, `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `label`, `lateout`, `options`, `out`, or `sym`, found `"{}"` --> $DIR/parse-error.rs:82:33 | LL | asm!("{}", in(reg) foo, "{}", out(reg) foo); - | ^^^^ expected one of 10 possible tokens + | ^^^^ expected one of 11 possible tokens error: asm template must be a string literal --> $DIR/parse-error.rs:84:14 @@ -340,17 +340,17 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR); | = 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 `""` +error: expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`, found `""` --> $DIR/parse-error.rs:137:28 | LL | global_asm!("", options(), ""); - | ^^ expected one of `clobber_abi`, `const`, `options`, or `sym` + | ^^ expected one of `#`, `clobber_abi`, `const`, `options`, or `sym` -error: expected one of `clobber_abi`, `const`, `options`, or `sym`, found `"{}"` +error: expected one of `#`, `clobber_abi`, `const`, `options`, or `sym`, found `"{}"` --> $DIR/parse-error.rs:139:30 | LL | global_asm!("{}", const FOO, "{}", const FOO); - | ^^^^ expected one of `clobber_abi`, `const`, `options`, or `sym` + | ^^^^ expected one of `#`, `clobber_abi`, `const`, `options`, or `sym` error: asm template must be a string literal --> $DIR/parse-error.rs:141:13 |
