Skip to content

Commit 884d495

Browse files
committed
Auto merge of rust-lang#135771 - GuillaumeGomez:jump-to-def-perf, r=<try>
[PERF for "jump to def"] Re-enable "jump to def" feature on rustc docs This PR is NOT meant to be merged. `@fmease` and I are using it to check perfs on the "jump to def" feature. r? `@fmease`
2 parents b5741a3 + 0a62c9e commit 884d495

File tree

2 files changed

+4
-1
lines changed
  • compiler/rustc_interface/src
  • src/bootstrap/src/core/build_steps

2 files changed

+4
-1
lines changed

Diff for: compiler/rustc_interface/src/passes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ fn run_required_analyses(tcx: TyCtxt<'_>) {
827827
if tcx.sess.opts.unstable_opts.input_stats {
828828
rustc_passes::input_stats::print_hir_stats(tcx);
829829
}
830-
#[cfg(debug_assertions)]
830+
#[cfg(all(not(doc), debug_assertions))]
831831
rustc_passes::hir_id_validator::check_crate(tcx);
832832
let sess = tcx.sess;
833833
sess.time("misc_checking_1", || {

Diff for: src/bootstrap/src/core/build_steps/doc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,9 @@ impl Step for Rustc {
845845
cargo.rustdocflag("--extern-html-root-url");
846846
cargo.rustdocflag("ena=https://docs.rs/ena/latest/");
847847

848+
// Enabling the "jump to def" feature on rustc's source code pages.
849+
cargo.rustdocflag("--generate-link-to-definition");
850+
848851
let mut to_open = None;
849852

850853
let out_dir = builder.stage_out(compiler, Mode::Rustc).join(target).join("doc");

0 commit comments

Comments
 (0)