1
Fork 0

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 https://github.com/rust-lang/rust/pull/134302.
This commit is contained in:
Matthias Krüger 2025-01-06 20:59:36 +01:00 committed by GitHub
commit 873ae7a5ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -865,11 +865,11 @@ fn main_args(
}
let krate = rustc_interface::passes::parse(sess);
rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
if sess.dcx().has_errors().is_some() {
sess.dcx().fatal("Compilation failed, aborting rustdoc");
}
rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {
core::run_global_ctxt(tcx, show_coverage, render_options, output_format)
});