diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-08 19:45:12 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2019-06-08 22:38:12 +0300 |
| commit | 0ca3c2f881fc4bc51bfa92f1adcd1b845b812534 (patch) | |
| tree | 872462c18de8b5bcfad199cb88eb2731305b3f12 /src/libsyntax/attr | |
| parent | ffe23475cba4b933475715ff72ca0be6aea0a398 (diff) | |
| download | rust-0ca3c2f881fc4bc51bfa92f1adcd1b845b812534.tar.gz rust-0ca3c2f881fc4bc51bfa92f1adcd1b845b812534.zip | |
syntax: Move most of the `TokenKind` methods to `Token`
Diffstat (limited to 'src/libsyntax/attr')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index b5d9b761773..d7e43f645df 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -20,7 +20,7 @@ use crate::source_map::{BytePos, Spanned, dummy_spanned}; use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; use crate::parse::parser::Parser; use crate::parse::{self, ParseSess, PResult}; -use crate::parse::token::{self, Token, TokenKind}; +use crate::parse::token::{self, Token}; use crate::ptr::P; use crate::symbol::{sym, Symbol}; use crate::ThinVec; @@ -467,8 +467,7 @@ impl MetaItem { segment.ident.span.ctxt()); idents.push(TokenTree::token(token::ModSep, mod_sep_span).into()); } - idents.push(TokenTree::token(TokenKind::from_ast_ident(segment.ident), - segment.ident.span).into()); + idents.push(TokenTree::Token(Token::from_ast_ident(segment.ident)).into()); last_pos = segment.ident.span.hi(); } self.node.tokens(self.span).append_to_tree_and_joint_vec(&mut idents); |
