]> git.lizzy.rs Git - rust.git/commitdiff
Use `p.token` instead of `p.look_ahead()`
authorCamelid <camelidcamel@gmail.com>
Thu, 18 Jun 2020 02:02:57 +0000 (19:02 -0700)
committerCamelid <camelidcamel@gmail.com>
Sat, 20 Jun 2020 18:12:43 +0000 (11:12 -0700)
src/librustc_builtin_macros/asm.rs

index 9c8e148f83a332a1c0fb1569dc9ff1abe779d47b..119536da0502464a5e4a20d5c4f9990e993d2e6c 100644 (file)
@@ -298,7 +298,7 @@ fn err_duplicate_option<'a>(p: &mut Parser<'a>, symbol: Symbol, span: Span) {
         String::new(),
         Applicability::MachineApplicable,
     );
-    if p.look_ahead(0, |t| t == &token::Comma) {
+    if p.token.kind == token::Comma {
         err.tool_only_span_suggestion(
             p.token.span,
             "remove this comma",