Use question_mark feature in librustc_mir.

This commit is contained in:
Ahmed Charles 2016-08-27 02:32:28 -07:00
parent 8a9e52a8e7
commit e10e0bcf2d

View File

@ -77,12 +77,12 @@ pub fn dump_mir<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
node_id, promotion_id, pass_name, disambiguator);
file_path.push(&file_name);
let _ = fs::File::create(&file_path).and_then(|mut file| {
try!(writeln!(file, "// MIR for `{}`", node_path));
try!(writeln!(file, "// node_id = {}", node_id));
try!(writeln!(file, "// pass_name = {}", pass_name));
try!(writeln!(file, "// disambiguator = {}", disambiguator));
try!(writeln!(file, ""));
try!(write_mir_fn(tcx, src, mir, &mut file, auxiliary));
writeln!(file, "// MIR for `{}`", node_path)?;
writeln!(file, "// node_id = {}", node_id)?;
writeln!(file, "// pass_name = {}", pass_name)?;
writeln!(file, "// disambiguator = {}", disambiguator)?;
writeln!(file, "")?;
write_mir_fn(tcx, src, mir, &mut file, auxiliary)?;
Ok(())
});
}