diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-04-18 22:53:50 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-04-24 20:59:44 +0300 |
| commit | b32d7b592306a2784585e842193db1546a2f9587 (patch) | |
| tree | 4d12769084adfda5aad64a7cb699155f9ee751cc /src/libsyntax/print/pprust.rs | |
| parent | 923001ebb7980ec425e6df561575bccaf5f90240 (diff) | |
| download | rust-b32d7b592306a2784585e842193db1546a2f9587.tar.gz rust-b32d7b592306a2784585e842193db1546a2f9587.zip | |
syntax: Merge keywords and remaining special idents in one list
Simplify the macro used for generation of keywords Make `Keyword::ident` private
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index d5318e32aa8..798477d8fe5 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -20,7 +20,7 @@ use attr; use attr::{AttrMetaMethods, AttributeMethods}; use codemap::{self, CodeMap, BytePos}; use errors; -use parse::token::{self, BinOpToken, Token, InternedString}; +use parse::token::{self, keywords, BinOpToken, Token, InternedString}; use parse::lexer::comments; use parse; use print::pp::{self, break_offset, word, space, zerobreak, hardbreak}; @@ -2957,9 +2957,8 @@ impl<'a> State<'a> { ast::TyKind::Infer if is_closure => self.print_pat(&input.pat)?, _ => { match input.pat.node { - PatKind::Ident(_, ref path1, _) if - path1.node.name == - parse::token::special_idents::Invalid.name => { + PatKind::Ident(_, ref path1, _) + if path1.node.name == keywords::Invalid.name() => { // Do nothing. } _ => { |
