From 86723d3d468745aa5e6494a766ea9ba6cb283b3c Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 20 Apr 2022 11:49:15 +1000 Subject: Use `true` for `open_delim`/`close_delim` in one spot. The `DelimToken` here is `NoDelim`, which means the returned delim tokens will just be ignored by `Parser::bump()`. This commit changes things so the delim tokens won't be returned. --- compiler/rustc_parse/src/parser/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 67bfb98ccd3..a337d8fae0f 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -335,7 +335,7 @@ impl TokenCursor { TokenCursorFrame::new( delim_span, token::NoDelim, - false, + true, if attr_style == AttrStyle::Inner { [TokenTree::token(token::Pound, span), TokenTree::token(token::Not, span), body] .iter() @@ -347,7 +347,7 @@ impl TokenCursor { .cloned() .collect::() }, - false, + true, ), )); -- cgit 1.4.1-3-g733a5