Enable "jump to def" feature on rustc docs#136589
Merged
bors merged 1 commit intorust-lang:masterfrom Feb 8, 2025
Merged
Conversation
jieyouxu
reviewed
Feb 5, 2025
Noratrieb
reviewed
Feb 5, 2025
| rustc_passes::input_stats::print_hir_stats(tcx); | ||
| } | ||
| #[cfg(debug_assertions)] | ||
| #[cfg(all(not(doc), debug_assertions))] |
oli-obk
requested changes
Feb 5, 2025
Comment on lines
831
to
832
| // FIXME: `--generate-link-to-definition` tries to resolve cfged out code | ||
| // see https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222 |
Contributor
There was a problem hiding this comment.
Is there an issue tracking getting rid of the cfged-out-code doc generating?
Member
Author
There was a problem hiding this comment.
Not that I know of.
""Normally"" we're supposed to do that already. The HIR visitor might provide it though (which is why it failed in the past), would be interesting to check why.
Contributor
There was a problem hiding this comment.
So it might be that the cfg doc is not necessary? Can you test that? If it is necessary, please create a tracking issue
Member
Author
There was a problem hiding this comment.
The cfg doc is necessary, otherwise I get:
error[E0433]: failed to resolve: could not resolve path `rustc_passes::hir_id_validator::check_crate`
--> compiler/rustc_interface/src/passes.rs:833:5
|
833 | rustc_passes::hir_id_validator::check_crate(tcx);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not resolve path `rustc_passes::hir_id_validator::check_crate`
|
Opened #136604.
This comment has been minimized.
This comment has been minimized.
646d530 to
e58aa21
Compare
Member
Author
|
Fixed indent and added code comment. |
Contributor
|
@bors r+ |
Collaborator
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Feb 6, 2025
…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`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 6, 2025
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`) - rust-lang#136193 (Implement pattern type ffi checks) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136530 (Implement `x perf` directly in bootstrap) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 6, 2025
…kingjubilee Rollup of 9 pull requests Successful merges: - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`) - rust-lang#136193 (Implement pattern type ffi checks) - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern) - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types) - rust-lang#136315 (Use short ty string for binop and unop errors) - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns) - rust-lang#136530 (Implement `x perf` directly in bootstrap) - rust-lang#136580 (Couple of changes to run rustc in miri) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 7, 2025
…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 was referenced Feb 7, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 8, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135179 (Make sure to use `Receiver` trait when extracting object method candidate) - rust-lang#136554 (Add `opt_alias_variances` and use it in outlives code) - rust-lang#136556 ([AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes.) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) - rust-lang#136615 (sys: net: Add UEFI stubs) - rust-lang#136635 (Remove outdated `base_port` calculation in std net test) - rust-lang#136682 (Move two windows process tests to tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 8, 2025
Rollup merge of rust-lang#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``
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Feb 28, 2025
…,GuillaumeGomez Re-enable `--generate-link-to-defintion` for tools internal rustdoc ~~These were removed because they used to break the build: rust-lang#122066 (comment), but testing locally it seems to work now.~~ This was re enabled in rust-lang#136589, but only for rustc, not tools. The FIXME that prompted removing this is still present. Do we have an issue with an MCVE for this? CC `@GuillaumeGomez` https://github.com/rust-lang/rust/blob/ac91805f3179fc2225c60e8ccf5a1daa09d43f3d/src/librustdoc/html/render/span_map.rs#L178-L182 try-job: aarch64-apple
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Feb 28, 2025
…,GuillaumeGomez Re-enable `--generate-link-to-defintion` for tools internal rustdoc ~~These were removed because they used to break the build: rust-lang#122066 (comment), but testing locally it seems to work now.~~ This was re enabled in rust-lang#136589, but only for rustc, not tools. The FIXME that prompted removing this is still present. Do we have an issue with an MCVE for this? CC ``@GuillaumeGomez`` https://github.com/rust-lang/rust/blob/ac91805f3179fc2225c60e8ccf5a1daa09d43f3d/src/librustdoc/html/render/span_map.rs#L178-L182 try-job: aarch64-apple
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Feb 28, 2025
…,GuillaumeGomez Re-enable `--generate-link-to-defintion` for tools internal rustdoc ~~These were removed because they used to break the build: rust-lang#122066 (comment), but testing locally it seems to work now.~~ This was re enabled in rust-lang#136589, but only for rustc, not tools. The FIXME that prompted removing this is still present. Do we have an issue with an MCVE for this? CC ```@GuillaumeGomez``` https://github.com/rust-lang/rust/blob/ac91805f3179fc2225c60e8ccf5a1daa09d43f3d/src/librustdoc/html/render/span_map.rs#L178-L182 try-job: aarch64-apple
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 1, 2025
Rollup merge of rust-lang#137693 - aDotInTheVoid:gaming, r=onur-ozkan,GuillaumeGomez Re-enable `--generate-link-to-defintion` for tools internal rustdoc ~~These were removed because they used to break the build: rust-lang#122066 (comment), but testing locally it seems to work now.~~ This was re enabled in rust-lang#136589, but only for rustc, not tools. The FIXME that prompted removing this is still present. Do we have an issue with an MCVE for this? CC ```@GuillaumeGomez``` https://github.com/rust-lang/rust/blob/ac91805f3179fc2225c60e8ccf5a1daa09d43f3d/src/librustdoc/html/render/span_map.rs#L178-L182 try-job: aarch64-apple
github-actions bot
pushed a commit
to tautschnig/verify-rust-std
that referenced
this pull request
Mar 11, 2025
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#135179 (Make sure to use `Receiver` trait when extracting object method candidate) - rust-lang#136554 (Add `opt_alias_variances` and use it in outlives code) - rust-lang#136556 ([AIX] Update tests/ui/wait-forked-but-failed-child.rs to accomodate exiting and idle processes.) - rust-lang#136589 (Enable "jump to def" feature on rustc docs) - rust-lang#136615 (sys: net: Add UEFI stubs) - rust-lang#136635 (Remove outdated `base_port` calculation in std net test) - rust-lang#136682 (Move two windows process tests to tests/ui) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables the rustdoc "jump to def" feature which is visible on the source code pages.
r? @oli-obk