Skip to content

Commit 9c0e373

Browse files
committed
Auto merge of #38773 - sanxiyn:rustdoc-ice, r=steveklabnik
Avoid rustdoc ICE when an unstable feature is used Fix #36159.
2 parents e06ce71 + 6319558 commit 9c0e373

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/librustdoc/core.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,15 @@ pub fn run_core(search_paths: SearchPaths,
156156
let name = link::find_crate_name(Some(&sess), &krate.attrs, &input);
157157

158158
let driver::ExpansionResult { defs, analysis, resolutions, mut hir_forest, .. } = {
159-
driver::phase_2_configure_and_expand(
160-
&sess, &cstore, krate, None, &name, None, resolve::MakeGlobMap::No, |_| Ok(()),
161-
).expect("phase_2_configure_and_expand aborted in rustdoc!")
159+
let result = driver::phase_2_configure_and_expand(&sess,
160+
&cstore,
161+
krate,
162+
None,
163+
&name,
164+
None,
165+
resolve::MakeGlobMap::No,
166+
|_| Ok(()));
167+
abort_on_err(result, &sess)
162168
};
163169

164170
let arena = DroplessArena::new();

0 commit comments

Comments
 (0)