Remove an unnecessary local variable.

This commit is contained in:
Nicholas Nethercote 2024-07-04 09:30:03 +10:00
parent 14b859fa3b
commit 88373e9f0c

View file

@ -310,12 +310,11 @@ impl<'a> StripUnconfigured<'a> {
else { else {
panic!("Bad tokens for attribute {attr:?}"); panic!("Bad tokens for attribute {attr:?}");
}; };
let pound_span = pound_token.span;
// We don't really have a good span to use for the synthesized `[]` // We don't really have a good span to use for the synthesized `[]`
// in `#[attr]`, so just use the span of the `#` token. // in `#[attr]`, so just use the span of the `#` token.
let bracket_group = AttrTokenTree::Delimited( let bracket_group = AttrTokenTree::Delimited(
DelimSpan::from_single(pound_span), DelimSpan::from_single(pound_token.span),
DelimSpacing::new(Spacing::JointHidden, Spacing::Alone), DelimSpacing::new(Spacing::JointHidden, Spacing::Alone),
Delimiter::Bracket, Delimiter::Bracket,
item.tokens item.tokens