pub fn create_dump_file<'tcx>(
    tcx: TyCtxt<'tcx>,
    extension: &str,
    pass_num: Option<&dyn Display>,
    pass_name: &str,
    disambiguator: &dyn Display,
    source: MirSource<'tcx>
) -> Result<BufWriter<File>>
Expand description

Attempts to open a file where we should dump a given MIR or other bit of MIR-related data. Used by mir-dump, but also by other bits of code (e.g., NLL inference) that dump graphviz data or other things, and hence takes the extension as an argument.