diff --git a/src/libproc_macro_tokens/parse.rs b/src/libproc_macro_tokens/parse.rs index 9af8a68cdcf49..5ab4fcd5dab29 100644 --- a/src/libproc_macro_tokens/parse.rs +++ b/src/libproc_macro_tokens/parse.rs @@ -15,12 +15,12 @@ extern crate syntax; use syntax::parse::{ParseSess, filemap_to_tts}; use syntax::tokenstream::TokenStream; -/// Map a string to tts, using a made-up filename. For example, `lex(15)` will return a +/// Map a string to tts, using a made-up filename. For example, `lex("15")` will return a /// TokenStream containing the literal 15. pub fn lex(source_str: &str) -> TokenStream { let ps = ParseSess::new(); TokenStream::from_tts(filemap_to_tts(&ps, - ps.codemap().new_filemap("procmacro_lex".to_string(), + ps.codemap().new_filemap("".to_string(), None, source_str.to_owned()))) }