Remove file_path_mapping
param from ParseSess::new
.
It's always empty.
This commit is contained in:
parent
aa38c26bbf
commit
3996447b37
6 changed files with 11 additions and 25 deletions
|
@ -18,7 +18,6 @@ extern crate rustc_driver;
|
|||
|
||||
use rustc_parse::new_parser_from_file;
|
||||
use rustc_session::parse::ParseSess;
|
||||
use rustc_span::source_map::FilePathMapping;
|
||||
use std::path::Path;
|
||||
|
||||
#[path = "mod_dir_simple/test.rs"]
|
||||
|
@ -31,10 +30,7 @@ pub fn main() {
|
|||
}
|
||||
|
||||
fn parse() {
|
||||
let parse_session = ParseSess::new(
|
||||
vec![rustc_parse::DEFAULT_LOCALE_RESOURCE],
|
||||
FilePathMapping::empty()
|
||||
);
|
||||
let parse_session = ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
|
||||
|
||||
let path = Path::new(file!());
|
||||
let path = path.canonicalize().unwrap();
|
||||
|
|
|
@ -38,7 +38,7 @@ use rustc_ast::*;
|
|||
use rustc_ast_pretty::pprust;
|
||||
use rustc_parse::new_parser_from_source_str;
|
||||
use rustc_session::parse::ParseSess;
|
||||
use rustc_span::source_map::{FilePathMapping, Spanned};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::Ident;
|
||||
use rustc_span::{FileName, DUMMY_SP};
|
||||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
@ -225,7 +225,7 @@ fn main() {
|
|||
}
|
||||
|
||||
fn run() {
|
||||
let ps = ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE], FilePathMapping::empty());
|
||||
let ps = ParseSess::new(vec![rustc_parse::DEFAULT_LOCALE_RESOURCE]);
|
||||
|
||||
iter_exprs(2, &mut |mut e| {
|
||||
// If the pretty printer is correct, then `parse(print(e))` should be identical to `e`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue