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.
This commit is contained in:
Nicholas Nethercote 2022-04-20 11:49:15 +10:00
parent 804103b0ae
commit 86723d3d46

View file

@ -335,7 +335,7 @@ impl TokenCursor {
TokenCursorFrame::new( TokenCursorFrame::new(
delim_span, delim_span,
token::NoDelim, token::NoDelim,
false, true,
if attr_style == AttrStyle::Inner { if attr_style == AttrStyle::Inner {
[TokenTree::token(token::Pound, span), TokenTree::token(token::Not, span), body] [TokenTree::token(token::Pound, span), TokenTree::token(token::Not, span), body]
.iter() .iter()
@ -347,7 +347,7 @@ impl TokenCursor {
.cloned() .cloned()
.collect::<TokenStream>() .collect::<TokenStream>()
}, },
false, true,
), ),
)); ));