Skip to content

Commit e8b8d2a

Browse files
committed
librustc_lexer: Reorder imports in lib.rs
1 parent ecd2673 commit e8b8d2a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_lexer/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ mod cursor;
1818
pub mod unescape;
1919

2020
use crate::cursor::{Cursor, EOF_CHAR};
21+
use self::TokenKind::*;
22+
use self::LiteralKind::*;
2123

2224
/// Parsed token.
2325
/// It doesn't contain information about data that has been parsed,
@@ -116,7 +118,6 @@ pub enum TokenKind {
116118
/// Unknown token, not expected by the lexer, e.g. "№"
117119
Unknown,
118120
}
119-
use self::TokenKind::*;
120121

121122
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
122123
pub enum LiteralKind {
@@ -137,7 +138,6 @@ pub enum LiteralKind {
137138
/// "br"abc"", "br#"abc"#", "br####"ab"###"c"####", "br#"a"
138139
RawByteStr { n_hashes: usize, started: bool, terminated: bool },
139140
}
140-
use self::LiteralKind::*;
141141

142142
/// Base of numeric literal encoding according to its prefix.
143143
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
@@ -241,7 +241,6 @@ pub fn is_id_continue(c: char) -> bool {
241241
|| (c > '\x7f' && unicode_xid::UnicodeXID::is_xid_continue(c))
242242
}
243243

244-
245244
impl Cursor<'_> {
246245
/// Parses a token from the input string.
247246
fn advance_token(&mut self) -> Token {

0 commit comments

Comments
 (0)