Skip to content

Commit fc33b25

Browse files
committed
Improve getting literal representation
1 parent 15ecf06 commit fc33b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_lint/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeLimits {
368368
let src = cx.sess().codemap().span_to_snippet(lit.span).ok()?;
369369
let firstch = src.chars().next()?;
370370

371-
if let Some(0) = char::to_digit(firstch, 10) {
371+
if firstch == '0' {
372372
match src.chars().nth(1) {
373373
Some('x') | Some('b') => return Some(src),
374374
_ => return None,

0 commit comments

Comments
 (0)