Move the has_errors check in rustdoc back to after TyCtxt is created
This commit is contained in:
parent
13738b0abe
commit
0705ea2a1c
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