fix: fix regression in #109203
This commit is contained in:
parent
f5b8f44e5d
commit
9dbf20ef27
3 changed files with 24 additions and 2 deletions
|
@ -423,11 +423,11 @@ impl<'a> Parser<'a> {
|
|||
if let token::Literal(Lit {
|
||||
kind: token::LitKind::Integer | token::LitKind::Float,
|
||||
symbol,
|
||||
suffix,
|
||||
suffix: Some(suffix), // no suffix makes it a valid literal
|
||||
}) = self.token.kind
|
||||
&& rustc_ast::MetaItemLit::from_token(&self.token).is_none()
|
||||
{
|
||||
Some((symbol.as_str().len(), suffix.unwrap()))
|
||||
Some((symbol.as_str().len(), suffix))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue