fix test
This commit is contained in:
parent
c086bafc8f
commit
cba96613de
1 changed files with 5 additions and 2 deletions
|
@ -12,8 +12,11 @@ use std::path::PathBuf;
|
|||
/// Map a string to tts, using a made-up filename:
|
||||
pub fn string_to_stream(source_str: String) -> TokenStream {
|
||||
let ps = ParseSess::new(FilePathMapping::empty());
|
||||
source_file_to_stream(&ps, ps.source_map()
|
||||
.new_source_file(PathBuf::from("bogofile").into(), source_str), None)
|
||||
source_file_to_stream(
|
||||
&ps,
|
||||
ps.source_map().new_source_file(PathBuf::from("bogofile").into(),
|
||||
source_str,
|
||||
), None).0
|
||||
}
|
||||
|
||||
/// Map string to parser (via tts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue