Skip to content

Commit 59e5a5c

Browse files
UserUser
User
authored and
User
committed
Resolved rustdoc crash (#33678) by aborting instead of unwrapping.
Removed Option use and comment to match.
1 parent 5d12502 commit 59e5a5c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustdoc/core.rs

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

180179
let _ignore = tcx.dep_graph.in_ignore();
@@ -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)