Pack the u128 in LitKind::Int

This commit is contained in:
Josh Stone 2024-01-17 15:40:30 -08:00
parent 167555f36a
commit 33e0422826
38 changed files with 89 additions and 71 deletions

View file

@ -124,7 +124,7 @@ fn parse_depth<'sess>(
};
if let Ok(lit_kind) = LitKind::from_token_lit(*lit)
&& let LitKind::Int(n_u128, LitIntType::Unsuffixed) = lit_kind
&& let Ok(n_usize) = usize::try_from(n_u128)
&& let Ok(n_usize) = usize::try_from(n_u128.get())
{
Ok(n_usize)
} else {