]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lexer/src/lib.rs
Inline and remove `validate_int_literal`.
[rust.git] / compiler / rustc_lexer / src / lib.rs
index 51515976e4ee97371520f892b854ad076ba36fb4..0d29d7b1e3d9b04b3d926e4e75d4045a8d2026ab 100644 (file)
@@ -203,13 +203,13 @@ pub enum RawStrError {
 #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
 pub enum Base {
     /// Literal starts with "0b".
-    Binary,
+    Binary = 2,
     /// Literal starts with "0o".
-    Octal,
-    /// Literal starts with "0x".
-    Hexadecimal,
+    Octal = 8,
     /// Literal doesn't contain a prefix.
-    Decimal,
+    Decimal = 10,
+    /// Literal starts with "0x".
+    Hexadecimal = 16,
 }
 
 /// `rustc` allows files to have a shebang, e.g. "#!/usr/bin/rustrun",