Skip to content

Commit 58f812b

Browse files
committed
Use p.token instead of p.look_ahead()
1 parent db9d376 commit 58f812b

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_builtin_macros

1 file changed

+1
-1
lines changed

src/librustc_builtin_macros/asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
298298
String::new(),
299299
Applicability::MachineApplicable,
300300
);
301-
if p.look_ahead(0, |t| t == &token::Comma) {
301+
if p.token.kind == token::Comma {
302302
err.tool_only_span_suggestion(
303303
p.token.span,
304304
"remove this comma",

0 commit comments

Comments
 (0)