From e8b8d2a7257b83698f095f51e2f5127176fc8816 Mon Sep 17 00:00:00 2001 From: Igor Aleksanov Date: Sun, 3 Nov 2019 12:57:12 +0300 Subject: [PATCH] librustc_lexer: Reorder imports in lib.rs --- src/librustc_lexer/src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/librustc_lexer/src/lib.rs b/src/librustc_lexer/src/lib.rs index 655619bc722..c50808adec1 100644 --- a/src/librustc_lexer/src/lib.rs +++ b/src/librustc_lexer/src/lib.rs @@ -18,6 +18,8 @@ pub mod unescape; use crate::cursor::{Cursor, EOF_CHAR}; +use self::TokenKind::*; +use self::LiteralKind::*; /// Parsed token. /// It doesn't contain information about data that has been parsed, @@ -116,7 +118,6 @@ pub enum TokenKind { /// Unknown token, not expected by the lexer, e.g. "№" Unknown, } -use self::TokenKind::*; #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] pub enum LiteralKind { @@ -137,7 +138,6 @@ pub enum LiteralKind { /// "br"abc"", "br#"abc"#", "br####"ab"###"c"####", "br#"a" RawByteStr { n_hashes: usize, started: bool, terminated: bool }, } -use self::LiteralKind::*; /// Base of numeric literal encoding according to its prefix. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] @@ -241,7 +241,6 @@ pub fn is_id_continue(c: char) -> bool { || (c > '\x7f' && unicode_xid::UnicodeXID::is_xid_continue(c)) } - impl Cursor<'_> { /// Parses a token from the input string. fn advance_token(&mut self) -> Token {