Skip to content

Commit 97a65b6

Browse files
committed
Add option to customize the nll-facts' folder location
1 parent 388ef34 commit 97a65b6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/rustc_mir/src/borrow_check/nll.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ pub(in crate::borrow_check) fn compute_regions<'cx, 'tcx>(
275275
let polonius_output = all_facts.and_then(|all_facts| {
276276
if infcx.tcx.sess.opts.debugging_opts.nll_facts {
277277
let def_path = infcx.tcx.def_path(def_id);
278-
let dir_path =
279-
PathBuf::from("nll-facts").join(def_path.to_filename_friendly_no_crate());
278+
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.debugging_opts.nll_facts_dir)
279+
.join(def_path.to_filename_friendly_no_crate());
280280
all_facts.write_to_dir(dir_path, location_table).unwrap();
281281
}
282282

compiler/rustc_session/src/options.rs

+2
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
969969
"use new LLVM pass manager (default: no)"),
970970
nll_facts: bool = (false, parse_bool, [UNTRACKED],
971971
"dump facts from NLL analysis into side files (default: no)"),
972+
nll_facts_dir: String = ("nll-facts".to_string(), parse_string, [UNTRACKED],
973+
"the directory the NLL facts are dumped into (default: `nll-facts`)"),
972974
no_analysis: bool = (false, parse_no_flag, [UNTRACKED],
973975
"parse and expand the source, but run no analysis"),
974976
no_codegen: bool = (false, parse_no_flag, [TRACKED],

0 commit comments

Comments
 (0)