Skip to content

Commit 2dc3531

Browse files
committed
Retire Options::working_dir in favor SourceMap::working_dir
1 parent 699067e commit 2dc3531

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,6 @@ impl Default for Options {
13981398
json_unused_externs: JsonUnusedExterns::No,
13991399
json_future_incompat: false,
14001400
pretty: None,
1401-
working_dir: RealFileName::LocalPath(std::env::current_dir().unwrap()),
14021401
color: ColorConfig::Auto,
14031402
logical_env: FxIndexMap::default(),
14041403
verbose: false,
@@ -2752,13 +2751,6 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
27522751
.collect()
27532752
};
27542753

2755-
let working_dir = std::env::current_dir().unwrap_or_else(|e| {
2756-
early_dcx.early_fatal(format!("Current directory is invalid: {e}"));
2757-
});
2758-
2759-
let file_mapping = file_path_mapping(remap_path_prefix.clone(), &unstable_opts);
2760-
let working_dir = file_mapping.to_real_filename(&working_dir);
2761-
27622754
let verbose = matches.opt_present("verbose") || unstable_opts.verbose_internals;
27632755

27642756
Options {
@@ -2801,7 +2793,6 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
28012793
json_unused_externs,
28022794
json_future_incompat,
28032795
pretty,
2804-
working_dir,
28052796
color,
28062797
logical_env,
28072798
verbose,

compiler/rustc_session/src/options.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,6 @@ top_level_options!(
491491

492492
pretty: Option<PpMode> [UNTRACKED],
493493

494-
/// The (potentially remapped) working directory
495-
working_dir: RealFileName [TRACKED],
496494
color: ColorConfig [UNTRACKED],
497495

498496
verbose: bool [TRACKED_NO_CRATE_HASH],

0 commit comments

Comments
 (0)