@@ -144,7 +144,7 @@ fn parse_asm_operand<'a>(
144
144
} ) )
145
145
}
146
146
147
- // Public for rustfmt
147
+ // Public for rustfmt.
148
148
pub fn parse_raw_asm_args < ' a > (
149
149
p : & mut Parser < ' a > ,
150
150
sp : Span ,
@@ -176,13 +176,15 @@ pub fn parse_raw_asm_args<'a>(
176
176
return Err ( p. expect ( exp ! ( Comma ) ) . err ( ) . unwrap ( ) ) ;
177
177
}
178
178
}
179
+
180
+ // Accept trailing commas.
179
181
if p. token == token:: Eof {
180
182
break ;
181
- } // accept trailing commas
183
+ }
182
184
183
185
let span_start = p. token . span ;
184
186
185
- // Parse clobber_abi
187
+ // Parse ` clobber_abi`.
186
188
if p. eat_keyword ( exp ! ( ClobberAbi ) ) {
187
189
allow_templates = false ;
188
190
@@ -194,7 +196,7 @@ pub fn parse_raw_asm_args<'a>(
194
196
continue ;
195
197
}
196
198
197
- // Parse options
199
+ // Parse ` options`.
198
200
if p. eat_keyword ( exp ! ( Options ) ) {
199
201
allow_templates = false ;
200
202
@@ -206,7 +208,7 @@ pub fn parse_raw_asm_args<'a>(
206
208
continue ;
207
209
}
208
210
209
- // Parse operand names
211
+ // Parse operand names.
210
212
let name = if p. token . is_ident ( ) && p. look_ahead ( 1 , |t| * t == token:: Eq ) {
211
213
let ( ident, _) = p. token . ident ( ) . unwrap ( ) ;
212
214
p. bump ( ) ;
@@ -347,7 +349,7 @@ fn validate_raw_asm_args<'a>(
347
349
if !asm_macro. is_supported_option ( option) {
348
350
// Currently handled during parsing.
349
351
} else if args. options . contains ( option) {
350
- // Tool-only output
352
+ // Tool-only output.
351
353
dcx. emit_err ( errors:: AsmOptAlreadyprovided { span, symbol, full_span } ) ;
352
354
} else {
353
355
args. options |= option;
@@ -360,7 +362,7 @@ fn validate_raw_asm_args<'a>(
360
362
allow_templates = false ;
361
363
362
364
match & new_abis[ ..] {
363
- // should have errored above during parsing
365
+ // This should have errored above during parsing.
364
366
[ ] => unreachable ! ( ) ,
365
367
[ ( abi, _span) ] => args. clobber_abis . push ( ( * abi, arg. span ) ) ,
366
368
_ => args. clobber_abis . extend ( new_abis) ,
@@ -492,7 +494,7 @@ fn parse_options<'a>(
492
494
493
495
// NOTE: should this be handled during validation instead?
494
496
if !asm_macro. is_supported_option ( option) {
495
- // Tool-only output
497
+ // Tool-only output.
496
498
p. dcx ( ) . emit_err ( errors:: AsmUnsupportedOption {
497
499
span,
498
500
symbol : exp. kw ,
@@ -509,7 +511,7 @@ fn parse_options<'a>(
509
511
return p. unexpected_any ( ) ;
510
512
}
511
513
512
- // Allow trailing commas
514
+ // Allow trailing commas.
513
515
if p. eat ( exp ! ( CloseParen ) ) {
514
516
break ;
515
517
}
0 commit comments