[rustdoc] Correctly handle intra-doc links on inlined same item with different names - #162669
Open
GuillaumeGomez wants to merge 3 commits into
Open
[rustdoc] Correctly handle intra-doc links on inlined same item with different names#162669GuillaumeGomez wants to merge 3 commits into
GuillaumeGomez wants to merge 3 commits into
Conversation
Member
Author
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 11, 2026
…t-names, r=<try> [rustdoc] Correctly handle intra-doc links on inlined same item with different names
Contributor
This comment has been minimized.
This comment has been minimized.
Collaborator
|
Finished benchmarking commit (99fb368): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.0%, secondary -1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.1%, secondary 1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 492.706s -> 494.246s (0.31%) |
Member
Author
|
That's an unexpected good surprise. =D |
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.
Fixes #136777.
It works as follow: we keep the
DefIdindexing, but we add a newalternativesentry (same inlined items, but under a different path) which allows to pick the right entry.So now, why this approach instead of changing the indexing (like
(DefId, Symbol))? Because it's much less common to import a same item with different names, so increasing the size of the index seems unnecessary. That does make the code more noisy, which I'm not a big fan of, so if someone has ideas for improvements, definitely interested!r? @lolbinarycat