Skip to content

Commit 2fb6f8e

Browse files
committed
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 #33678
2 parents d0ca0ca + 59e5a5c commit 2fb6f8e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/librustdoc/core.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ pub fn run_core(search_paths: SearchPaths,
173173
&arenas,
174174
&name,
175175
|tcx, _, analysis, result| {
176-
// Return if the driver hit an err (in `result`)
177176
if let Err(_) = result {
178-
return None
177+
sess.fatal("Compilation failed, aborting rustdoc");
179178
}
180179

181180
let ty::CrateAnalysis { access_levels, .. } = analysis;
@@ -206,6 +205,6 @@ pub fn run_core(search_paths: SearchPaths,
206205
v.clean(&ctxt)
207206
};
208207

209-
Some((krate, ctxt.renderinfo.into_inner()))
210-
}), &sess).unwrap()
208+
(krate, ctxt.renderinfo.into_inner())
209+
}), &sess)
211210
}

0 commit comments

Comments
 (0)