diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-04 16:18:17 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-04 16:22:06 +1100 |
| commit | 3996447b37d5a061fba2f6009ec275f657467743 (patch) | |
| tree | 9a19047de57e41d927f3d5ba96c0f982aed36e84 /compiler/rustc_expand/src/tests.rs | |
| parent | aa38c26bbf84aa36e280cc120736c47a36cb467d (diff) | |
| download | rust-3996447b37d5a061fba2f6009ec275f657467743.tar.gz rust-3996447b37d5a061fba2f6009ec275f657467743.zip | |
Remove `file_path_mapping` param from `ParseSess::new`.
It's always empty.
Diffstat (limited to 'compiler/rustc_expand/src/tests.rs')
| -rw-r--r-- | compiler/rustc_expand/src/tests.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_expand/src/tests.rs b/compiler/rustc_expand/src/tests.rs index b242ce795fd..ad60e5691ef 100644 --- a/compiler/rustc_expand/src/tests.rs +++ b/compiler/rustc_expand/src/tests.rs @@ -72,10 +72,8 @@ where /// Maps a string to tts, using a made-up filename. pub(crate) fn string_to_stream(source_str: String) -> TokenStream { - let ps = ParseSess::new( - vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE], - FilePathMapping::empty(), - ); + let ps = + ParseSess::new(vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE]); source_file_to_stream( &ps, ps.source_map().new_source_file(PathBuf::from("bogofile").into(), source_str), @@ -85,10 +83,8 @@ pub(crate) fn string_to_stream(source_str: String) -> TokenStream { /// Parses a string, returns a crate. pub(crate) fn string_to_crate(source_str: String) -> ast::Crate { - let ps = ParseSess::new( - vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE], - FilePathMapping::empty(), - ); + let ps = + ParseSess::new(vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE]); with_error_checking_parse(source_str, &ps, |p| p.parse_crate_mod()) } |
