Skip to content

Commit ac363d8

Browse files
authored
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. #49545 changed libproc_macro to not generate `DotEq` token.
2 parents 21433f2 + 96bf06b commit ac363d8

File tree

6 files changed

+2
-9
lines changed

6 files changed

+2
-9
lines changed

src/librustc/ich/impls_syntax.rs

-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ fn hash_token<'a, 'gcx, W: StableHasherResult>(
314314
token::Token::DotDot |
315315
token::Token::DotDotDot |
316316
token::Token::DotDotEq |
317-
token::Token::DotEq |
318317
token::Token::Comma |
319318
token::Token::Semi |
320319
token::Token::Colon |

src/librustdoc/html/highlight.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'a> Classifier<'a> {
346346
token::Lifetime(..) => Class::Lifetime,
347347

348348
token::Eof | token::Interpolated(..) |
349-
token::Tilde | token::At | token::DotEq | token::SingleQuote => Class::None,
349+
token::Tilde | token::At| token::SingleQuote => Class::None,
350350
};
351351

352352
// Anything that didn't return above is the simple case where we the

src/libsyntax/ext/quote.rs

-1
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ fn expr_mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> P<ast::Expr> {
703703
token::At => "At",
704704
token::Dot => "Dot",
705705
token::DotDot => "DotDot",
706-
token::DotEq => "DotEq",
707706
token::DotDotDot => "DotDotDot",
708707
token::DotDotEq => "DotDotEq",
709708
token::Comma => "Comma",

src/libsyntax/parse/token.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ pub enum Token {
163163
DotDot,
164164
DotDotDot,
165165
DotDotEq,
166-
DotEq, // HACK(durka42) never produced by the parser, only used for libproc_macro
167166
Comma,
168167
Semi,
169168
Colon,
@@ -454,7 +453,6 @@ impl Token {
454453
Dot => match joint {
455454
Dot => DotDot,
456455
DotDot => DotDotDot,
457-
DotEq => DotDotEq,
458456
_ => return None,
459457
},
460458
DotDot => match joint {
@@ -477,7 +475,7 @@ impl Token {
477475
_ => return None,
478476
},
479477

480-
Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot | DotEq |
478+
Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot |
481479
DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar |
482480
Question | OpenDelim(..) | CloseDelim(..) => return None,
483481

@@ -606,7 +604,6 @@ impl Token {
606604
(&DotDot, &DotDot) |
607605
(&DotDotDot, &DotDotDot) |
608606
(&DotDotEq, &DotDotEq) |
609-
(&DotEq, &DotEq) |
610607
(&Comma, &Comma) |
611608
(&Semi, &Semi) |
612609
(&Colon, &Colon) |

src/libsyntax/print/pprust.rs

-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ pub fn token_to_string(tok: &Token) -> String {
210210
token::DotDot => "..".to_string(),
211211
token::DotDotDot => "...".to_string(),
212212
token::DotDotEq => "..=".to_string(),
213-
token::DotEq => ".=".to_string(),
214213
token::Comma => ",".to_string(),
215214
token::Semi => ";".to_string(),
216215
token::Colon => ":".to_string(),

src/libsyntax_ext/proc_macro_server.rs

-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ impl FromInternal<(TokenStream, &'_ ParseSess, &'_ mut Vec<Self>)>
213213
})
214214
}
215215

216-
DotEq => op!('.', '='),
217216
OpenDelim(..) | CloseDelim(..) => unreachable!(),
218217
Whitespace | Comment | Shebang(..) | Eof => unreachable!(),
219218
}

0 commit comments

Comments
 (0)