about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-01-20 15:01:45 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-02-05 17:40:33 +0100
commite58aa2105f3460c2da7aa747e7046a927d5cae7c (patch)
tree364b69309ada4e2d054346851424d3056b79e4fc /compiler/rustc_interface/src
parent820bfffc25fee9866aa8176529091e04b8824f09 (diff)
downloadrust-e58aa2105f3460c2da7aa747e7046a927d5cae7c.tar.gz
rust-e58aa2105f3460c2da7aa747e7046a927d5cae7c.zip
Re-enable "jump to def" feature on rustc docs
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index 8a121c5a865..ad0762fc222 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -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", || {