remove Tt prefix from TokenType variants

[breaking change]
This commit is contained in:
Oliver Schneider 2015-11-06 14:52:02 +01:00
parent 1be3f9f602
commit fcc7067904
15 changed files with 219 additions and 209 deletions

View file

@ -18,7 +18,7 @@ extern crate rustc;
use syntax::codemap::Span;
use syntax::parse::token::{self, str_to_ident, NtExpr, NtPat};
use syntax::ast::{TokenTree, TtToken, Pat};
use syntax::ast::{TokenTree, Pat};
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
use syntax::ext::build::AstBuilder;
use syntax::ext::tt::macro_parser::{MatchedSeq, MatchedNonterminal};

View file

@ -18,7 +18,7 @@ extern crate syntax;
extern crate rustc;
use syntax::codemap::Span;
use syntax::ast::{TokenTree, TtToken};
use syntax::ast::TokenTree;
use syntax::parse::token;
use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
use syntax::ext::build::AstBuilder; // trait for expr_usize
@ -40,7 +40,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
("I", 1)];
let text = match args {
[TtToken(_, token::Ident(s, _))] => s.to_string(),
[TokenTree::Token(_, token::Ident(s, _))] => s.to_string(),
_ => {
cx.span_err(sp, "argument should be a single identifier");
return DummyResult::any(sp);