Skip to content

Commit c3947a0

Browse files
only return offset when different to default
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
1 parent eaeda23 commit c3947a0

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_lexer/src

1 file changed

+1
-1
lines changed

compiler/rustc_lexer/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ impl Cursor<'_> {
606606

607607
/// Parses a number and in `.1` returns the offset of the literal suffix
608608
/// (this will be at the end of the token if there is no suffix)
609-
fn number(&mut self, first_digit: char) -> (LiteralKind, u32) {
609+
fn number(&mut self, first_digit: char) -> (LiteralKind, Option<u32>) {
610610
debug_assert!('0' <= self.prev() && self.prev() <= '9');
611611
let mut base = Base::Decimal;
612612
if first_digit == '0' {

0 commit comments

Comments
 (0)