Auto merge of #33702 - crimsun:pr33678, r=alexcrichton

Resolved rustdoc crash (#33678) by aborting instead of unwrapping.

Also removed Option use and comment to match.

Fixes https://github.com/rust-lang/rust/issues/33678
This commit is contained in:
bors 2016-05-19 05:48:11 -07:00
commit 2fb6f8e2c9

View File

@ -173,9 +173,8 @@ pub fn run_core(search_paths: SearchPaths,
&arenas,
&name,
|tcx, _, analysis, result| {
// Return if the driver hit an err (in `result`)
if let Err(_) = result {
return None
sess.fatal("Compilation failed, aborting rustdoc");
}
let ty::CrateAnalysis { access_levels, .. } = analysis;
@ -206,6 +205,6 @@ pub fn run_core(search_paths: SearchPaths,
v.clean(&ctxt)
};
Some((krate, ctxt.renderinfo.into_inner()))
}), &sess).unwrap()
(krate, ctxt.renderinfo.into_inner())
}), &sess)
}