mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Auto merge of #42402 - citizen428:create-dump-mir-dir, r=Mark-Simulacrum
Create directory for dump-mir-dir automatically Fixes #35543 r? @Mark-Simulacrum @Mark-Simulacrum I know someone else said that they'll work on this, but it has been 3+ weeks and I had nothing to do and wanted to contribute a bit. I now added the call to automatically create the directory as discussed, but was wondering how you feel about the suggestion to set a default directory, i.e. `target/mir`?
This commit is contained in:
commit
9a4e13f5c4
@ -111,6 +111,7 @@ fn dump_matched_mir_node<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
let p = Path::new(file_dir);
|
||||
file_path.push(p);
|
||||
};
|
||||
let _ = fs::create_dir_all(&file_path);
|
||||
let file_name = format!("rustc.node{}{}{}.{}.{}.mir",
|
||||
source.item_id(), promotion_id, pass_num, pass_name, disambiguator);
|
||||
file_path.push(&file_name);
|
||||
|
Loading…
Reference in New Issue
Block a user