From 631955888ee23bff7f968e4b03d5923caefe7bfe Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Mon, 2 Jan 2017 20:32:58 +0900 Subject: [PATCH] Avoid rustdoc ICE when an unstable feature is used --- src/librustdoc/core.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 1f989c557d3..514eb6ea843 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -156,9 +156,15 @@ pub fn run_core(search_paths: SearchPaths, let name = link::find_crate_name(Some(&sess), &krate.attrs, &input); let driver::ExpansionResult { defs, analysis, resolutions, mut hir_forest, .. } = { - driver::phase_2_configure_and_expand( - &sess, &cstore, krate, None, &name, None, resolve::MakeGlobMap::No, |_| Ok(()), - ).expect("phase_2_configure_and_expand aborted in rustdoc!") + let result = driver::phase_2_configure_and_expand(&sess, + &cstore, + krate, + None, + &name, + None, + resolve::MakeGlobMap::No, + |_| Ok(())); + abort_on_err(result, &sess) }; let arena = DroplessArena::new();