Skip to content

Commit 8fcf113

Browse files
authored
Rollup merge of rust-lang#96543 - nnethercote:rm-make_token_stream-hacks, r=Aaron1011
Remove hacks in `make_token_stream`. `make_tokenstream` has three commented hacks, and a comment at the top referring to rust-lang#67062. These hacks have no observable effect, at least as judged by running the test suite. The hacks were added in rust-lang#82608, with an explanation [here](rust-lang#82608 (comment)). It appears that one of the following is true: (a) they never did anything useful, (b) they do something useful but we have no test coverage for them, or (c) something has changed in the meantime that means they are no longer necessary. This commit removes the hacks and the comments, in the hope that (b) is not true. r? `@Aaron1011`
2 parents 050978b + 77f0964 commit 8fcf113

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/parse/macros/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ fn check_keyword<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option<MacroArg> {
7979
for &keyword in RUST_KW.iter() {
8080
if parser.token.is_keyword(keyword)
8181
&& parser.look_ahead(1, |t| {
82-
t.kind == TokenKind::Eof
83-
|| t.kind == TokenKind::Comma
84-
|| t.kind == TokenKind::CloseDelim(Delimiter::Invisible)
82+
t.kind == TokenKind::Eof || t.kind == TokenKind::Comma
8583
})
8684
{
8785
parser.bump();

0 commit comments

Comments
 (0)