1
Fork 0

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); node_id, promotion_id, pass_name, disambiguator);
file_path.push(&file_name); file_path.push(&file_name);
let _ = fs::File::create(&file_path).and_then(|mut file| { let _ = fs::File::create(&file_path).and_then(|mut file| {
try!(writeln!(file, "// MIR for `{}`", node_path)); writeln!(file, "// MIR for `{}`", node_path)?;
try!(writeln!(file, "// node_id = {}", node_id)); writeln!(file, "// node_id = {}", node_id)?;
try!(writeln!(file, "// pass_name = {}", pass_name)); writeln!(file, "// pass_name = {}", pass_name)?;
try!(writeln!(file, "// disambiguator = {}", disambiguator)); writeln!(file, "// disambiguator = {}", disambiguator)?;
try!(writeln!(file, "")); writeln!(file, "")?;
try!(write_mir_fn(tcx, src, mir, &mut file, auxiliary)); write_mir_fn(tcx, src, mir, &mut file, auxiliary)?;
Ok(()) Ok(())
}); });
} }