Check redundant_explicit_links against generated URLs - #156009
Conversation
redundant_explicit_links against generated URLsredundant_explicit_links against generated URLs
This comment has been minimized.
This comment has been minimized.
78cc7d7 to
52290d1
Compare
This comment has been minimized.
This comment has been minimized.
52290d1 to
4c47005
Compare
This comment has been minimized.
This comment has been minimized.
4c47005 to
8a48cea
Compare
|
I just noticed #156711, which seems related to broader rustdoc/compiler path-resolution work. Does that tracking issue change the desired direction for this PR? If the preferred approach is to wait for the broader item-signature resolution mechanism, I’m happy to adjust/park this, but I’d appreciate guidance so I know whether this PR is still worth pursuing. |
|
I've yet to review your PR (sorry about that), so I can't tell for certain. However, I'm inclined to believe that the feature described in that tracking issue is not relevant. Double-checking that later. |
This comment has been minimized.
This comment has been minimized.
will rebase rq |
8a48cea to
da95d5c
Compare
This comment has been minimized.
This comment has been minimized.
|
Sorry, just uncovered this PR in my "to review list". ^^' Thanks for the improvement! @bors r+ rollup |
…t-links-url, r=GuillaumeGomez Check `redundant_explicit_links` against generated URLs Fixes rust-lang#155458. `rustdoc::redundant_explicit_links` checked explicit link destinations by resolving both the label and the destination as intra-doc paths. That misses links written as local rustdoc page URLs, such as `struct.B.html`, because those URLs do not appear in `doc_link_resolutions`. This PR keeps the existing path-resolution check and falls back to comparing the explicit destination with the local href that rustdoc would generate for the resolved label.
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #161683 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#161683), which was unapproved. |
|
I’ll do rebase in a few mins 🫠 |
da95d5c to
1f5e36d
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Let's go again! =D @bors r+ rollup |
…t-links-url, r=GuillaumeGomez Check `redundant_explicit_links` against generated URLs Fixes rust-lang#155458. `rustdoc::redundant_explicit_links` checked explicit link destinations by resolving both the label and the destination as intra-doc paths. That misses links written as local rustdoc page URLs, such as `struct.B.html`, because those URLs do not appear in `doc_link_resolutions`. This PR keeps the existing path-resolution check and falls back to comparing the explicit destination with the local href that rustdoc would generate for the resolved label.
Rollup of 9 pull requests Successful merges: - #161689 (bootstrap: don't LTO C dependencies on aarch64) - #161553 (rustdoc: fix issue preventing "read more" links from generating.) - #161670 (Pass LargeDataThreshold to LLVM module IR) - #146529 (rustdoc: Nuke `--passes=list` and defossilize the passes infrastructure) - #156009 (Check `redundant_explicit_links` against generated URLs) - #159583 (Add new `invalid_markdown_table` rustdoc lint) - #161098 (PassWrapper: handle LLVM 24 change in function types) - #161641 (Check for missing rustfmt in the stdarch intrinsic test step sooner) - #161661 (Don't treat slashes as path seps after drive letters in verbatim paths) Failed merges: - #156749 (remove `box_patterns`)
Rollup merge of #156009 - qaijuang:rustdoc-redundant-explicit-links-url, r=GuillaumeGomez Check `redundant_explicit_links` against generated URLs Fixes #155458. `rustdoc::redundant_explicit_links` checked explicit link destinations by resolving both the label and the destination as intra-doc paths. That misses links written as local rustdoc page URLs, such as `struct.B.html`, because those URLs do not appear in `doc_link_resolutions`. This PR keeps the existing path-resolution check and falls back to comparing the explicit destination with the local href that rustdoc would generate for the resolved label.
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (823287b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.5%, secondary 17.5%)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: 471.419s -> 470.542s (-0.19%) |
Fixes #155458.
rustdoc::redundant_explicit_linkschecked explicit link destinations by resolving both the label and the destination as intra-doc paths. That misses links written as local rustdoc page URLs, such asstruct.B.html, because those URLs do not appear indoc_link_resolutions.This PR keeps the existing path-resolution check and falls back to comparing the explicit destination with the local href that rustdoc would generate for the resolved label.