diff options
| author | bors <bors@rust-lang.org> | 2023-10-31 17:07:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-31 17:07:35 +0000 |
| commit | 50be22964035027398754e54cd3a497efb00f83e (patch) | |
| tree | 44ba50f0622d34697eeac9c5806207db061ce60a /src | |
| parent | d7d9f15be205b45d44700e7ac33b4f79b91f9680 (diff) | |
| parent | 4512f211ae77306b0cd0686a7871d56edbf36d30 (diff) | |
| download | rust-50be22964035027398754e54cd3a497efb00f83e.tar.gz rust-50be22964035027398754e54cd3a497efb00f83e.zip | |
Auto merge of #117450 - oli-obk:rustdoc_verify, r=estebank
Accept less invalid Rust in rustdoc pulled out of https://github.com/rust-lang/rust/pull/117213 where this change was already approved This only affects rustdoc, and has up to [20% perf regressions in rustdoc](https://github.com/rust-lang/rust/pull/117213#issuecomment-1785776288). These are unavoidable, as we are simply doing more checks now, but it's part of the longer term plan of making rustdoc more resistant to ICEs by only accepting valid Rust code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/core.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 17b117de5d4..6d9f8b820c4 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -319,10 +319,14 @@ pub(crate) fn run_global_ctxt( tcx.hir().for_each_module(|module| tcx.ensure().collect_mod_item_types(module)) }); - // NOTE: This is copy/pasted from typeck/lib.rs and should be kept in sync with those changes. + // NOTE: These are copy/pasted from typeck/lib.rs and should be kept in sync with those changes. + let _ = tcx.sess.time("wf_checking", || { + tcx.hir().try_par_for_each_module(|module| tcx.ensure().check_mod_type_wf(module)) + }); tcx.sess.time("item_types_checking", || { tcx.hir().for_each_module(|module| tcx.ensure().check_mod_item_types(module)) }); + tcx.sess.abort_if_errors(); tcx.sess.time("missing_docs", || rustc_lint::check_crate(tcx)); tcx.sess.time("check_mod_attrs", || { |
