diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-04 17:55:23 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-06 14:03:14 +0300 |
| commit | 99b27d749c22117eccf862f5ee4eb540b65b681f (patch) | |
| tree | e891310a8eb306921f8a054bb40cf653433403fe /src/libsyntax/parse/diagnostics.rs | |
| parent | eac3846b65b068a5cbdfafc786e258554b875dae (diff) | |
| download | rust-99b27d749c22117eccf862f5ee4eb540b65b681f.tar.gz rust-99b27d749c22117eccf862f5ee4eb540b65b681f.zip | |
syntax: Rename `Token` into `TokenKind`
Diffstat (limited to 'src/libsyntax/parse/diagnostics.rs')
| -rw-r--r-- | src/libsyntax/parse/diagnostics.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/parse/diagnostics.rs b/src/libsyntax/parse/diagnostics.rs index fc09943d4f5..b391f7ca327 100644 --- a/src/libsyntax/parse/diagnostics.rs +++ b/src/libsyntax/parse/diagnostics.rs @@ -229,8 +229,8 @@ impl<'a> Parser<'a> { pub fn expected_one_of_not_found( &mut self, - edible: &[token::Token], - inedible: &[token::Token], + edible: &[token::TokenKind], + inedible: &[token::TokenKind], ) -> PResult<'a, bool /* recovered */> { fn tokens_to_string(tokens: &[TokenType]) -> String { let mut i = tokens.iter(); @@ -368,7 +368,7 @@ impl<'a> Parser<'a> { /// Eats and discards tokens until one of `kets` is encountered. Respects token trees, /// passes through any errors encountered. Used for error recovery. - crate fn eat_to_tokens(&mut self, kets: &[&token::Token]) { + crate fn eat_to_tokens(&mut self, kets: &[&token::TokenKind]) { let handler = self.diagnostic(); if let Err(ref mut err) = self.parse_seq_to_before_tokens( @@ -388,7 +388,7 @@ impl<'a> Parser<'a> { /// let _ = vec![1, 2, 3].into_iter().collect::<Vec<usize>>>>(); /// ^^ help: remove extra angle brackets /// ``` - crate fn check_trailing_angle_brackets(&mut self, segment: &PathSegment, end: token::Token) { + crate fn check_trailing_angle_brackets(&mut self, segment: &PathSegment, end: token::TokenKind) { // This function is intended to be invoked after parsing a path segment where there are two // cases: // @@ -726,7 +726,7 @@ impl<'a> Parser<'a> { /// closing delimiter. pub fn unexpected_try_recover( &mut self, - t: &token::Token, + t: &token::TokenKind, ) -> PResult<'a, bool /* recovered */> { let token_str = pprust::token_to_string(t); let this_token_str = self.this_token_descr(); @@ -903,7 +903,7 @@ impl<'a> Parser<'a> { crate fn recover_closing_delimiter( &mut self, - tokens: &[token::Token], + tokens: &[token::TokenKind], mut err: DiagnosticBuilder<'a>, ) -> PResult<'a, bool> { let mut pos = None; |
