Add option to customize the nll-facts' folder location
This commit is contained in:
parent
388ef34904
commit
97a65b6f81
2 changed files with 4 additions and 2 deletions
|
@ -275,8 +275,8 @@ pub(in crate::borrow_check) fn compute_regions<'cx, 'tcx>(
|
||||||
let polonius_output = all_facts.and_then(|all_facts| {
|
let polonius_output = all_facts.and_then(|all_facts| {
|
||||||
if infcx.tcx.sess.opts.debugging_opts.nll_facts {
|
if infcx.tcx.sess.opts.debugging_opts.nll_facts {
|
||||||
let def_path = infcx.tcx.def_path(def_id);
|
let def_path = infcx.tcx.def_path(def_id);
|
||||||
let dir_path =
|
let dir_path = PathBuf::from(&infcx.tcx.sess.opts.debugging_opts.nll_facts_dir)
|
||||||
PathBuf::from("nll-facts").join(def_path.to_filename_friendly_no_crate());
|
.join(def_path.to_filename_friendly_no_crate());
|
||||||
all_facts.write_to_dir(dir_path, location_table).unwrap();
|
all_facts.write_to_dir(dir_path, location_table).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -969,6 +969,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
||||||
"use new LLVM pass manager (default: no)"),
|
"use new LLVM pass manager (default: no)"),
|
||||||
nll_facts: bool = (false, parse_bool, [UNTRACKED],
|
nll_facts: bool = (false, parse_bool, [UNTRACKED],
|
||||||
"dump facts from NLL analysis into side files (default: no)"),
|
"dump facts from NLL analysis into side files (default: no)"),
|
||||||
|
nll_facts_dir: String = ("nll-facts".to_string(), parse_string, [UNTRACKED],
|
||||||
|
"the directory the NLL facts are dumped into (default: `nll-facts`)"),
|
||||||
no_analysis: bool = (false, parse_no_flag, [UNTRACKED],
|
no_analysis: bool = (false, parse_no_flag, [UNTRACKED],
|
||||||
"parse and expand the source, but run no analysis"),
|
"parse and expand the source, but run no analysis"),
|
||||||
no_codegen: bool = (false, parse_no_flag, [TRACKED],
|
no_codegen: bool = (false, parse_no_flag, [TRACKED],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue