Improve getting literal representation
This commit is contained in:
parent
15ecf06948
commit
fc33b2567c
1 changed files with 1 additions and 1 deletions
|
|
@ -368,7 +368,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
|
|||
let src = cx.sess().codemap().span_to_snippet(lit.span).ok()?;
|
||||
let firstch = src.chars().next()?;
|
||||
|
||||
if let Some(0) = char::to_digit(firstch, 10) {
|
||||
if firstch == '0' {
|
||||
match src.chars().nth(1) {
|
||||
Some('x') | Some('b') => return Some(src),
|
||||
_ => return None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue