Skip to content

Commit e614116

Browse files
committed
Update tests
1 parent c883fa4 commit e614116

File tree

2 files changed

+12
-41
lines changed

2 files changed

+12
-41
lines changed

src/test/ui/asm/parse-error.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ fn main() {
3434
//~^ ERROR expected one of
3535
asm!("", options(nomem, foo));
3636
//~^ ERROR expected one of
37-
asm!("", options(), options());
38-
//~^ ERROR asm options cannot be specified multiple times
39-
asm!("", options(), options(), options());
40-
//~^ ERROR asm options cannot be specified multiple times
41-
//~^^ ERROR asm options cannot be specified multiple times
4237
asm!("{}", options(), const foo);
4338
//~^ ERROR arguments are not allowed after options
4439
asm!("{a}", a = const foo, a = const bar);

src/test/ui/asm/parse-error.stderr

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -82,111 +82,87 @@ error: expected one of `)`, `att_syntax`, `nomem`, `noreturn`, `nostack`, `prese
8282
LL | asm!("", options(nomem, foo));
8383
| ^^^ expected one of 8 possible tokens
8484

85-
error: asm options cannot be specified multiple times
86-
--> $DIR/parse-error.rs:37:29
87-
|
88-
LL | asm!("", options(), options());
89-
| --------- ^^^^^^^^^ duplicate options
90-
| |
91-
| previously here
92-
93-
error: asm options cannot be specified multiple times
94-
--> $DIR/parse-error.rs:39:29
95-
|
96-
LL | asm!("", options(), options(), options());
97-
| --------- ^^^^^^^^^ duplicate options
98-
| |
99-
| previously here
100-
101-
error: asm options cannot be specified multiple times
102-
--> $DIR/parse-error.rs:39:40
103-
|
104-
LL | asm!("", options(), options(), options());
105-
| --------- ^^^^^^^^^ duplicate options
106-
| |
107-
| previously here
108-
10985
error: arguments are not allowed after options
110-
--> $DIR/parse-error.rs:42:31
86+
--> $DIR/parse-error.rs:37:31
11187
|
11288
LL | asm!("{}", options(), const foo);
11389
| --------- ^^^^^^^^^ argument
11490
| |
11591
| previous options
11692

11793
error: duplicate argument named `a`
118-
--> $DIR/parse-error.rs:44:36
94+
--> $DIR/parse-error.rs:39:36
11995
|
12096
LL | asm!("{a}", a = const foo, a = const bar);
12197
| ------------- ^^^^^^^^^^^^^ duplicate argument
12298
| |
12399
| previously here
124100

125101
error: argument never used
126-
--> $DIR/parse-error.rs:44:36
102+
--> $DIR/parse-error.rs:39:36
127103
|
128104
LL | asm!("{a}", a = const foo, a = const bar);
129105
| ^^^^^^^^^^^^^ argument never used
130106
|
131107
= help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
132108

133109
error: explicit register arguments cannot have names
134-
--> $DIR/parse-error.rs:47:18
110+
--> $DIR/parse-error.rs:42:18
135111
|
136112
LL | asm!("", a = in("eax") foo);
137113
| ^^^^^^^^^^^^^^^^^
138114

139115
error: named arguments cannot follow explicit register arguments
140-
--> $DIR/parse-error.rs:49:36
116+
--> $DIR/parse-error.rs:44:36
141117
|
142118
LL | asm!("{a}", in("eax") foo, a = const bar);
143119
| ------------- ^^^^^^^^^^^^^ named argument
144120
| |
145121
| explicit register argument
146122

147123
error: named arguments cannot follow explicit register arguments
148-
--> $DIR/parse-error.rs:51:36
124+
--> $DIR/parse-error.rs:46:36
149125
|
150126
LL | asm!("{a}", in("eax") foo, a = const bar);
151127
| ------------- ^^^^^^^^^^^^^ named argument
152128
| |
153129
| explicit register argument
154130

155131
error: positional arguments cannot follow named arguments or explicit register arguments
156-
--> $DIR/parse-error.rs:53:36
132+
--> $DIR/parse-error.rs:48:36
157133
|
158134
LL | asm!("{1}", in("eax") foo, const bar);
159135
| ------------- ^^^^^^^^^ positional argument
160136
| |
161137
| explicit register argument
162138

163139
error: expected one of `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
164-
--> $DIR/parse-error.rs:55:29
140+
--> $DIR/parse-error.rs:50:29
165141
|
166142
LL | asm!("", options(), "");
167143
| ^^ expected one of 8 possible tokens
168144

169145
error: expected one of `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
170-
--> $DIR/parse-error.rs:57:33
146+
--> $DIR/parse-error.rs:52:33
171147
|
172148
LL | asm!("{}", in(reg) foo, "{}", out(reg) foo);
173149
| ^^^^ expected one of 8 possible tokens
174150

175151
error: asm template must be a string literal
176-
--> $DIR/parse-error.rs:59:14
152+
--> $DIR/parse-error.rs:54:14
177153
|
178154
LL | asm!(format!("{{{}}}", 0), in(reg) foo);
179155
| ^^^^^^^^^^^^^^^^^^^^
180156
|
181157
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
182158

183159
error: asm template must be a string literal
184-
--> $DIR/parse-error.rs:61:21
160+
--> $DIR/parse-error.rs:56:21
185161
|
186162
LL | asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
187163
| ^^^^^^^^^^^^^^^^^^^^
188164
|
189165
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
190166

191-
error: aborting due to 28 previous errors
167+
error: aborting due to 25 previous errors
192168

0 commit comments

Comments
 (0)