diff options
| author | bors <bors@rust-lang.org> | 2014-10-29 10:22:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-29 10:22:01 +0000 |
| commit | 3bc545373df4c81ba223a8bece14cbc27eb85a4d (patch) | |
| tree | 6f2bc6000e1b8b10a1a74aedc57fa9d1f0fc565b /src/test | |
| parent | 124508dea1caf213886e5e1a02d425cac8dd0b54 (diff) | |
| parent | 665ad9c175f746b78c7eae81432b543d2e16c3c9 (diff) | |
| download | rust-3bc545373df4c81ba223a8bece14cbc27eb85a4d.tar.gz rust-3bc545373df4c81ba223a8bece14cbc27eb85a4d.zip | |
auto merge of #18365 : bjz/rust/token, r=alexcrichton
[breaking-change]
(for syntax-extensions)
- Token variant identifiers have been converted to PascalCase for consistency with Rust coding standards
- Some free-functions in `syntax::token` have been converted to methods on `syntax::token::Token`:
- `can_begin_expr` -> `Token::can_begin_expr`
- `close_delimiter_for` -> `Token::get_close_delimiter`
- `is_lit` -> `Token::is_lit`
- `is_ident` -> `Token::is_ident`
- `is_path` -> `Token::is_path`
- `is_plain_ident` -> `Token::is_plain_ident`
- `is_lifetime` -> `Token::is_lifetime`
- `is_mutability` -> `Token::is_mutability`
- `to_binop` -> `Token::to_binop`
- `is_keyword` -> `Token::is_keyword`
- `is_any_keyword` -> `Token:is_any_keyword`
- `is_strict_keyword` -> `Token::is_strict_keyword`
- `is_reserved_keyword` -> `Token::is_reserved_keyword`
- `mtwt_token_eq` -> `Token::mtwt_eq`
- `token::Ident` now takes an enum instead of a boolean for clarity
- `token::{to_string, binop_to_string}` were moved to `pprust::{token_to_string, binop_to_string}`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/auxiliary/roman_numerals.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/removed-syntax-record.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/auxiliary/roman_numerals.rs b/src/test/auxiliary/roman_numerals.rs index 40ed3a35ddf..519f32fc248 100644 --- a/src/test/auxiliary/roman_numerals.rs +++ b/src/test/auxiliary/roman_numerals.rs @@ -17,7 +17,7 @@ extern crate syntax; extern crate rustc; use syntax::codemap::Span; -use syntax::parse::token::{IDENT, get_ident}; +use syntax::parse::token; use syntax::ast::{TokenTree, TtToken}; use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacExpr}; use syntax::ext::build::AstBuilder; // trait for expr_uint @@ -39,7 +39,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree]) ("I", 1)]; let text = match args { - [TtToken(_, IDENT(s, _))] => get_ident(s).to_string(), + [TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(), _ => { cx.span_err(sp, "argument should be a single identifier"); return DummyResult::any(sp); diff --git a/src/test/compile-fail/removed-syntax-record.rs b/src/test/compile-fail/removed-syntax-record.rs index 38c5122c2c3..b3fa04d8025 100644 --- a/src/test/compile-fail/removed-syntax-record.rs +++ b/src/test/compile-fail/removed-syntax-record.rs @@ -8,4 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -type t = { f: () }; //~ ERROR expected type, found token LBRACE +type t = { f: () }; //~ ERROR expected type, found token LBrace |
