Pack the u128 in LitKind::Int
This commit is contained in:
parent
167555f36a
commit
33e0422826
38 changed files with 89 additions and 71 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue