about summary refs log tree commit diff
path: root/src/libsyntax/diagnostics/plugin.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-06 21:11:06 +0000
committerbors <bors@rust-lang.org>2015-11-06 21:11:06 +0000
commit475f91f46eecc7411311106e5c45f7e4781fb5e1 (patch)
tree5e04ceda74d38896d4d2a5a926c6c954d612146b /src/libsyntax/diagnostics/plugin.rs
parentb14dc5bc1c4a9a652364235822505d28ec25950a (diff)
parentfcc706790457e26bfa43377a0525bbc87cb0f3d1 (diff)
downloadrust-475f91f46eecc7411311106e5c45f7e4781fb5e1.tar.gz
rust-475f91f46eecc7411311106e5c45f7e4781fb5e1.zip
Auto merge of #29582 - oli-obk:token_tree, r=sfackler
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
-rw-r--r--src/libsyntax/diagnostics/plugin.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs
index a276765e216..be0d5729c70 100644
--- a/src/libsyntax/diagnostics/plugin.rs
+++ b/src/libsyntax/diagnostics/plugin.rs
@@ -54,7 +54,7 @@ pub fn expand_diagnostic_used<'cx>(ecx: &'cx mut ExtCtxt,
                                    token_tree: &[TokenTree])
                                    -> Box<MacResult+'cx> {
     let code = match (token_tree.len(), token_tree.get(0)) {
-        (1, Some(&ast::TtToken(_, token::Ident(code, _)))) => code,
+        (1, Some(&TokenTree::Token(_, token::Ident(code, _)))) => code,
         _ => unreachable!()
     };
 
@@ -92,12 +92,12 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt,
         token_tree.get(1),
         token_tree.get(2)
     ) {
-        (1, Some(&ast::TtToken(_, token::Ident(ref code, _))), None, None) => {
+        (1, Some(&TokenTree::Token(_, token::Ident(ref code, _))), None, None) => {
             (code, None)
         },
-        (3, Some(&ast::TtToken(_, token::Ident(ref code, _))),
-            Some(&ast::TtToken(_, token::Comma)),
-            Some(&ast::TtToken(_, token::Literal(token::StrRaw(description, _), None)))) => {
+        (3, Some(&TokenTree::Token(_, token::Ident(ref code, _))),
+            Some(&TokenTree::Token(_, token::Comma)),
+            Some(&TokenTree::Token(_, token::Literal(token::StrRaw(description, _), None)))) => {
             (code, Some(description))
         }
         _ => unreachable!()
@@ -160,9 +160,9 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
     let (crate_name, name) = match (&token_tree[0], &token_tree[2]) {
         (
             // Crate name.
-            &ast::TtToken(_, token::Ident(ref crate_name, _)),
+            &TokenTree::Token(_, token::Ident(ref crate_name, _)),
             // DIAGNOSTICS ident.
-            &ast::TtToken(_, token::Ident(ref name, _))
+            &TokenTree::Token(_, token::Ident(ref name, _))
         ) => (*&crate_name, name),
         _ => unreachable!()
     };