Auto merge of #8624 - pitaj:is_digit_ascii_radix, r=xFrednet
New lint `is_digit_ascii_radix` Closes #6399 changelog: Added [`is_digit_ascii_radix`]: recommend `is_ascii_digit()` or `is_ascii_hexdigit()` in place of `is_digit(10)` and `is_digit(16)`
This commit is contained in:
commit
dbcd82885f
18 changed files with 160 additions and 14 deletions
|
|
@ -32,4 +32,5 @@ msrv_aliases! {
|
|||
1,28,0 { FROM_BOOL }
|
||||
1,17,0 { FIELD_INIT_SHORTHAND, STATIC_IN_CONST, EXPECT_ERR }
|
||||
1,16,0 { STR_REPEAT }
|
||||
1,24,0 { IS_ASCII_DIGIT }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ impl<'a> NumericLiteral<'a> {
|
|||
.trim_start()
|
||||
.chars()
|
||||
.next()
|
||||
.map_or(false, |c| c.is_digit(10))
|
||||
.map_or(false, |c| c.is_ascii_digit())
|
||||
{
|
||||
let (unsuffixed, suffix) = split_suffix(src, lit_kind);
|
||||
let float = matches!(lit_kind, LitKind::Float(..));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue