Rollup merge of #136589 - GuillaumeGomez:enable-jump-to-def-compiler, r=oli-obk

Enable "jump to def" feature on rustc docs

This PR enables the rustdoc "jump to def" feature which is visible on the source code pages.

r? ``@oli-obk``
This commit is contained in:
Matthias Krüger 2025-02-07 21:31:01 +01:00 committed by GitHub
commit 688fc9bd21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -827,7 +827,9 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
if tcx.sess.opts.unstable_opts.input_stats {
rustc_passes::input_stats::print_hir_stats(tcx);
}
#[cfg(debug_assertions)]
// When using rustdoc's "jump to def" feature, it enters this code and `check_crate`
// is not defined. So we need to cfg it out.
#[cfg(all(not(doc), debug_assertions))]
rustc_passes::hir_id_validator::check_crate(tcx);
let sess = tcx.sess;
sess.time("misc_checking_1", || {