mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
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.
This commit is contained in:
commit
ac363d8793
@ -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 |
|
||||
|
@ -346,7 +346,7 @@ impl<'a> Classifier<'a> {
|
||||
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
|
||||
|
@ -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",
|
||||
|
@ -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) |
|
||||
|
@ -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(),
|
||||
|
@ -213,7 +213,6 @@ impl FromInternal<(TokenStream, &'_ ParseSess, &'_ mut Vec<Self>)>
|
||||
})
|
||||
}
|
||||
|
||||
DotEq => op!('.', '='),
|
||||
OpenDelim(..) | CloseDelim(..) => unreachable!(),
|
||||
Whitespace | Comment | Shebang(..) | Eof => unreachable!(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user