diff options
| author | Jeremy Soller <jackpot51@gmail.com> | 2016-11-23 08:21:15 -0700 |
|---|---|---|
| committer | Jeremy Soller <jackpot51@gmail.com> | 2016-11-23 08:21:15 -0700 |
| commit | b3c91dfb6a2e21c82966d0a13f9cd3e51da94654 (patch) | |
| tree | 08bb76f6d05c6295b9ee7c3690b78a9ff52c7693 /src/libsyntax/util/parser_testing.rs | |
| parent | ae2029fc62d744e252a5a077ce0dfbf2d1683d25 (diff) | |
| parent | 9fba8df2115141173ad60837f129f18e74424531 (diff) | |
| download | rust-b3c91dfb6a2e21c82966d0a13f9cd3e51da94654.tar.gz rust-b3c91dfb6a2e21c82966d0a13f9cd3e51da94654.zip | |
Merge branch 'master' into redox
Diffstat (limited to 'src/libsyntax/util/parser_testing.rs')
| -rw-r--r-- | src/libsyntax/util/parser_testing.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index 76d3f2a063c..e703dc6b419 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -8,11 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use ast; +use ast::{self, Ident}; use parse::{ParseSess,PResult,filemap_to_tts}; use parse::{lexer, new_parser_from_source_str}; use parse::parser::Parser; -use parse::token; use ptr::P; use tokenstream; use std::iter::Peekable; @@ -78,9 +77,9 @@ pub fn string_to_pat(source_str: String) -> P<ast::Pat> { }) } -/// Convert a vector of strings to a vector of ast::Ident's -pub fn strs_to_idents(ids: Vec<&str> ) -> Vec<ast::Ident> { - ids.iter().map(|u| token::str_to_ident(*u)).collect() +/// Convert a vector of strings to a vector of Ident's +pub fn strs_to_idents(ids: Vec<&str> ) -> Vec<Ident> { + ids.iter().map(|u| Ident::from_str(*u)).collect() } /// Does the given string match the pattern? whitespace in the first string |
