Skip to content

Commit b842b34

Browse files
committed
Remove Token::LArrow
1 parent 650c1c3 commit b842b34

File tree

7 files changed

+3
-14
lines changed

7 files changed

+3
-14
lines changed

src/librustc/ich/impls_syntax.rs

-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ fn hash_token<'a, 'gcx, W: StableHasherResult>(
329329
token::Token::Colon |
330330
token::Token::ModSep |
331331
token::Token::RArrow |
332-
token::Token::LArrow |
333332
token::Token::FatArrow |
334333
token::Token::Pound |
335334
token::Token::Dollar |

src/librustdoc/html/highlight.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl<'a> Classifier<'a> {
249249

250250
// Miscellaneous, no highlighting.
251251
token::Dot | token::DotDot | token::DotDotDot | token::DotDotEq | token::Comma |
252-
token::Semi | token::Colon | token::ModSep | token::LArrow | token::OpenDelim(_) |
252+
token::Semi | token::Colon | token::ModSep | token::OpenDelim(_) |
253253
token::CloseDelim(token::Brace) | token::CloseDelim(token::Paren) |
254254
token::CloseDelim(token::NoDelim) => Class::None,
255255

src/libsyntax/parse/lexer/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1032,10 +1032,6 @@ impl<'a> StringReader<'a> {
10321032
'<' => {
10331033
Ok(self.binop(token::Shl))
10341034
}
1035-
'-' => {
1036-
self.bump();
1037-
Ok(token::LArrow)
1038-
}
10391035
_ => {
10401036
Ok(token::Lt)
10411037
}

src/libsyntax/parse/parser.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2140,8 +2140,7 @@ impl<'a> Parser<'a> {
21402140
let ident = self.parse_path_segment_ident()?;
21412141

21422142
let is_args_start = |token: &token::Token| match *token {
2143-
token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren)
2144-
| token::LArrow => true,
2143+
token::Lt | token::BinOp(token::Shl) | token::OpenDelim(token::Paren) => true,
21452144
_ => false,
21462145
};
21472146
let check_args_start = |this: &mut Self| {

src/libsyntax/parse/token.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ pub enum Token {
180180
Colon,
181181
ModSep,
182182
RArrow,
183-
LArrow,
184183
FatArrow,
185184
Pound,
186185
Dollar,
@@ -455,7 +454,6 @@ impl Token {
455454
Eq => Le,
456455
Lt => BinOp(Shl),
457456
Le => BinOpEq(Shl),
458-
BinOp(Minus) => LArrow,
459457
_ => return None,
460458
},
461459
Gt => match joint {
@@ -501,7 +499,7 @@ impl Token {
501499
},
502500

503501
Le | EqEq | Ne | Ge | AndAnd | OrOr | Tilde | BinOpEq(..) | At | DotDotDot |
504-
DotDotEq | Comma | Semi | ModSep | RArrow | LArrow | FatArrow | Pound | Dollar |
502+
DotDotEq | Comma | Semi | ModSep | RArrow | FatArrow | Pound | Dollar |
505503
Question | OpenDelim(..) | CloseDelim(..) |
506504
Literal(..) | Ident(..) | Lifetime(..) | Interpolated(..) | DocComment(..) |
507505
Whitespace | Comment | Shebang(..) | Eof => return None,
@@ -546,7 +544,6 @@ impl Token {
546544
(&Colon, &Colon) |
547545
(&ModSep, &ModSep) |
548546
(&RArrow, &RArrow) |
549-
(&LArrow, &LArrow) |
550547
(&FatArrow, &FatArrow) |
551548
(&Pound, &Pound) |
552549
(&Dollar, &Dollar) |

src/libsyntax/print/pprust.rs

-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ pub fn token_to_string(tok: &Token) -> String {
215215
token::Colon => ":".to_string(),
216216
token::ModSep => "::".to_string(),
217217
token::RArrow => "->".to_string(),
218-
token::LArrow => "<-".to_string(),
219218
token::FatArrow => "=>".to_string(),
220219
token::OpenDelim(token::Paren) => "(".to_string(),
221220
token::CloseDelim(token::Paren) => ")".to_string(),

src/libsyntax_ext/proc_macro_server.rs

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ impl FromInternal<(TreeAndJoint, &'_ ParseSess, &'_ mut Vec<Self>)>
135135
Colon => op!(':'),
136136
ModSep => op!(':', ':'),
137137
RArrow => op!('-', '>'),
138-
LArrow => op!('<', '-'),
139138
FatArrow => op!('=', '>'),
140139
Pound => op!('#'),
141140
Dollar => op!('$'),

0 commit comments

Comments
 (0)