Skip to content

Commit 09d0472

Browse files
authored
Rollup merge of #135157 - bjorn3:fix_rustdoc_error_abort, r=jieyouxu,GuillaumeGomez
Move the has_errors check in rustdoc back to after TyCtxt is created This was accidentally moved before TyCtxt creation by #134302.
2 parents d95d5aa + 0705ea2 commit 09d0472

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustdoc/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -865,11 +865,11 @@ fn main_args(
865865
}
866866

867867
let krate = rustc_interface::passes::parse(sess);
868-
if sess.dcx().has_errors().is_some() {
869-
sess.dcx().fatal("Compilation failed, aborting rustdoc");
870-
}
871-
872868
rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
869+
if sess.dcx().has_errors().is_some() {
870+
sess.dcx().fatal("Compilation failed, aborting rustdoc");
871+
}
872+
873873
let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {
874874
core::run_global_ctxt(tcx, show_coverage, render_options, output_format)
875875
});

0 commit comments

Comments
 (0)