diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-10-22 23:35:32 +1100 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2014-10-26 09:53:29 +1100 |
| commit | ec3f0201e76b5cf689f3e8e6418435c3e6d9271c (patch) | |
| tree | a86e67e155e7f801fe9a76e95a8f970c251cc966 /src/libsyntax/diagnostics/plugin.rs | |
| parent | 971d776aa5a678672eb3d37f2f507664aacd2440 (diff) | |
| download | rust-ec3f0201e76b5cf689f3e8e6418435c3e6d9271c.tar.gz rust-ec3f0201e76b5cf689f3e8e6418435c3e6d9271c.zip | |
Rename TokenTree variants for clarity
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index d3c39284f55..8ea08c58d06 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -50,7 +50,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt, token_tree: &[TokenTree]) -> Box<MacResult+'cx> { let code = match token_tree { - [ast::TTTok(_, token::IDENT(code, _))] => code, + [ast::TTToken(_, token::IDENT(code, _))] => code, _ => unreachable!() }; with_registered_diagnostics(|diagnostics| { @@ -82,12 +82,12 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, token_tree: &[TokenTree]) -> Box<MacResult+'cx> { let (code, description) = match token_tree { - [ast::TTTok(_, token::IDENT(ref code, _))] => { + [ast::TTToken(_, token::IDENT(ref code, _))] => { (code, None) }, - [ast::TTTok(_, token::IDENT(ref code, _)), - ast::TTTok(_, token::COMMA), - ast::TTTok(_, token::LIT_STR_RAW(description, _))] => { + [ast::TTToken(_, token::IDENT(ref code, _)), + ast::TTToken(_, token::COMMA), + ast::TTToken(_, token::LIT_STR_RAW(description, _))] => { (code, Some(description)) } _ => unreachable!() @@ -110,7 +110,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, token_tree: &[TokenTree]) -> Box<MacResult+'cx> { let name = match token_tree { - [ast::TTTok(_, token::IDENT(ref name, _))] => name, + [ast::TTToken(_, token::IDENT(ref name, _))] => name, _ => unreachable!() }; |
