From e10e0bcf2d4e8a5c98c4cfb577f161187b74bfcc Mon Sep 17 00:00:00 2001 From: Ahmed Charles Date: Sat, 27 Aug 2016 02:32:28 -0700 Subject: [PATCH] Use question_mark feature in librustc_mir. --- src/librustc_mir/pretty.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librustc_mir/pretty.rs b/src/librustc_mir/pretty.rs index d46a7b2bb9506..01e2c6308ba01 100644 --- a/src/librustc_mir/pretty.rs +++ b/src/librustc_mir/pretty.rs @@ -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(()) }); }