From 77f096453c819224e712bf56b4567558c7ae31e2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 11 May 2022 10:14:49 +1000 Subject: [PATCH] Remove some unnecessary invisible delimiter checks. These seem to have no useful effect... they don't seem useful from a code inspection point of view, and they affect anything in the test suite. --- src/parse/macros/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/parse/macros/mod.rs b/src/parse/macros/mod.rs index d4dbf21f8ca..67f3985926e 100644 --- a/src/parse/macros/mod.rs +++ b/src/parse/macros/mod.rs @@ -79,9 +79,7 @@ fn check_keyword<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option { for &keyword in RUST_KW.iter() { if parser.token.is_keyword(keyword) && parser.look_ahead(1, |t| { - t.kind == TokenKind::Eof - || t.kind == TokenKind::Comma - || t.kind == TokenKind::CloseDelim(Delimiter::Invisible) + t.kind == TokenKind::Eof || t.kind == TokenKind::Comma }) { parser.bump();