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:
commit
873ae7a5ad
1 changed files with 4 additions and 4 deletions
|
@ -865,11 +865,11 @@ fn main_args(
|
||||||
}
|
}
|
||||||
|
|
||||||
let krate = rustc_interface::passes::parse(sess);
|
let krate = rustc_interface::passes::parse(sess);
|
||||||
if sess.dcx().has_errors().is_some() {
|
|
||||||
sess.dcx().fatal("Compilation failed, aborting rustdoc");
|
|
||||||
}
|
|
||||||
|
|
||||||
rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
|
rustc_interface::create_and_enter_global_ctxt(compiler, krate, |tcx| {
|
||||||
|
if sess.dcx().has_errors().is_some() {
|
||||||
|
sess.dcx().fatal("Compilation failed, aborting rustdoc");
|
||||||
|
}
|
||||||
|
|
||||||
let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {
|
let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || {
|
||||||
core::run_global_ctxt(tcx, show_coverage, render_options, output_format)
|
core::run_global_ctxt(tcx, show_coverage, render_options, output_format)
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue