about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-12-03 18:07:20 +0800
committerGitHub <noreply@github.com>2018-12-03 18:07:20 +0800
commitac363d8793a1c6b69822a583e6f7d0b2f9904c86 (patch)
tree5b019959dc6468639ef1e0e32416623d39bc4331 /src/libsyntax
parent21433f2812bf36c8149050d39b6fcf0b62a6f19b (diff)
parent96bf06baf308e5cd2ad43962895f626724395e7d (diff)
downloadrust-ac363d8793a1c6b69822a583e6f7d0b2f9904c86.tar.gz
rust-ac363d8793a1c6b69822a583e6f7d0b2f9904c86.zip
Rollup merge of #56438 - yui-knk:remove_not_used_DotEq_token, r=petrochenkov
Remove not used `DotEq` token

Currently libproc_macro does not use `DotEq` token.
https://github.com/rust-lang/rust/pull/49545 changed libproc_macro
to not generate `DotEq` token.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/quote.rs1
-rw-r--r--src/libsyntax/parse/token.rs5
-rw-r--r--src/libsyntax/print/pprust.rs1
3 files changed, 1 insertions, 6 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index c6e0adbb5a4..69ed318b049 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -703,7 +703,6 @@ fn expr_mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> P<ast::Expr> {
         token::At           => "At",
         token::Dot          => "Dot",
         token::DotDot       => "DotDot",
-        token::DotEq        => "DotEq",
         token::DotDotDot    => "DotDotDot",
         token::DotDotEq     => "DotDotEq",
         token::Comma        => "Comma",
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 46fc6454d1c..4a5f3e240da 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -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 @@ impl Token {
             Dot => match joint {
                 Dot => DotDot,
                 DotDot => DotDotDot,
-                DotEq => DotDotEq,
                 _ => return None,
             },
             DotDot => match joint {
@@ -477,7 +475,7 @@ impl Token {
                 _ => 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 @@ impl Token {
             (&DotDot, &DotDot) |
             (&DotDotDot, &DotDotDot) |
             (&DotDotEq, &DotDotEq) |
-            (&DotEq, &DotEq) |
             (&Comma, &Comma) |
             (&Semi, &Semi) |
             (&Colon, &Colon) |
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index ec641949292..a9f08fdd411 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -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(),