]> git.lizzy.rs Git - rust.git/commitdiff
Remove not used `DotEq` token
authoryui-knk <spiketeika@gmail.com>
Sun, 2 Dec 2018 13:15:50 +0000 (22:15 +0900)
committeryui-knk <spiketeika@gmail.com>
Sun, 2 Dec 2018 14:11:08 +0000 (23:11 +0900)
Currently libproc_macro does not use `DotEq` token.
https://github.com/rust-lang/rust/pull/49545 changed libproc_macro
to not generate `DotEq` token.

src/librustc/ich/impls_syntax.rs
src/librustdoc/html/highlight.rs
src/libsyntax/ext/quote.rs
src/libsyntax/parse/token.rs
src/libsyntax/print/pprust.rs
src/libsyntax_ext/proc_macro_server.rs

index 4be467c01aac1c409472d3942ac3dbc8fad39fc1..b629fb820b34dd85fc6e043b5d982c2974620c9a 100644 (file)
@@ -314,7 +314,6 @@ fn hash_token<'a, 'gcx, W: StableHasherResult>(
         token::Token::DotDot |
         token::Token::DotDotDot |
         token::Token::DotDotEq |
-        token::Token::DotEq |
         token::Token::Comma |
         token::Token::Semi |
         token::Token::Colon |
index 6522261fe1e7c81a345f71783cdfcd1222202198..8fb91cc23f7ba87b6f21499cfed0c1445b0a2be8 100644 (file)
@@ -346,7 +346,7 @@ fn write_token<W: Writer>(&mut self,
             token::Lifetime(..) => Class::Lifetime,
 
             token::Eof | token::Interpolated(..) |
-            token::Tilde | token::At | token::DotEq | token::SingleQuote => Class::None,
+            token::Tilde | token::At| token::SingleQuote => Class::None,
         };
 
         // Anything that didn't return above is the simple case where we the
index c6e0adbb5a43e087a73b867cd13843dcc1db37a5..69ed318b0498fbd2a4f5ba50faf38159489094ec 100644 (file)
@@ -703,7 +703,6 @@ macro_rules! mk_lit {
         token::At           => "At",
         token::Dot          => "Dot",
         token::DotDot       => "DotDot",
-        token::DotEq        => "DotEq",
         token::DotDotDot    => "DotDotDot",
         token::DotDotEq     => "DotDotEq",
         token::Comma        => "Comma",
index 46fc6454d1c3bf453eb266549ca27698d29a815d..4a5f3e240daee798d42fc7372dcb2202931f1e2e 100644 (file)
@@ -163,7 +163,6 @@ pub enum Token {
     DotDot,
     DotDotDot,
     DotDotEq,
-    DotEq, // HACK(durka42) never produced by the parser, only used for libproc_macro
     Comma,
     Semi,
     Colon,
@@ -454,7 +453,6 @@ pub fn is_reserved_ident(&self) -> bool {
             Dot => match joint {
                 Dot => DotDot,
                 DotDot => DotDotDot,
-                DotEq => DotDotEq,
                 _ => return None,
             },
             DotDot => match joint {
@@ -477,7 +475,7 @@ pub fn is_reserved_ident(&self) -> bool {
                 _ => return None,
             },
 
-            Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot | DotEq |
+            Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot |
             DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar |
             Question | OpenDelim(..) | CloseDelim(..) => return None,
 
@@ -606,7 +604,6 @@ pub fn interpolated_to_tokenstream(&self, sess: &ParseSess, span: Span)
             (&DotDot, &DotDot) |
             (&DotDotDot, &DotDotDot) |
             (&DotDotEq, &DotDotEq) |
-            (&DotEq, &DotEq) |
             (&Comma, &Comma) |
             (&Semi, &Semi) |
             (&Colon, &Colon) |
index 14ad4b5c6f8159475b23ac5ba31b5d4775e51ce5..4fa1d0fac352a580c9035e8b320873abff80f1a0 100644 (file)
@@ -210,7 +210,6 @@ pub fn token_to_string(tok: &Token) -> String {
         token::DotDot               => "..".to_string(),
         token::DotDotDot            => "...".to_string(),
         token::DotDotEq             => "..=".to_string(),
-        token::DotEq                => ".=".to_string(),
         token::Comma                => ",".to_string(),
         token::Semi                 => ";".to_string(),
         token::Colon                => ":".to_string(),
index 56bd58b28a66e6553f4faf95dfe10153daf4247e..4babc2e612fd8680323dc79ad47ca8791119ae71 100644 (file)
@@ -213,7 +213,6 @@ macro_rules! op {
                 })
             }
 
-            DotEq => op!('.', '='),
             OpenDelim(..) | CloseDelim(..) => unreachable!(),
             Whitespace | Comment | Shebang(..) | Eof => unreachable!(),
         }