diff options
Diffstat (limited to 'src/libsyntax/util/parser_testing.rs')
| -rw-r--r-- | src/libsyntax/util/parser_testing.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/util/parser_testing.rs b/src/libsyntax/util/parser_testing.rs index 1ecfe9c96f4..6e6e2d181b9 100644 --- a/src/libsyntax/util/parser_testing.rs +++ b/src/libsyntax/util/parser_testing.rs @@ -9,7 +9,7 @@ // except according to those terms. use ast; -use parse::{ParseSess,string_to_filemap,filemap_to_tts}; +use parse::{ParseSess,filemap_to_tts}; use parse::new_parser_from_source_str; use parse::parser::Parser; use parse::token; @@ -19,8 +19,7 @@ use str::char_at; /// Map a string to tts, using a made-up filename: pub fn string_to_tts(source_str: String) -> Vec<ast::TokenTree> { let ps = ParseSess::new(); - filemap_to_tts(&ps, - string_to_filemap(&ps, source_str, "bogofile".to_string())) + filemap_to_tts(&ps, ps.codemap().new_filemap("bogofile".to_string(), source_str)) } /// Map string to parser (via tts) |
