[rustdoc] Fix invalid jump to def macro link generation by GuillaumeGomez · Pull Request #148080 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

T-rustdoc-frontend

Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

labels

Oct 24, 2025

lolbinarycat

lolbinarycat

lolbinarycat

lolbinarycat

@GuillaumeGomez

@bors bors added the S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

label

Nov 11, 2025

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Nov 11, 2025
… r=lolbinarycat

[rustdoc] Fix invalid jump to def macro link generation

Follow-up of rust-lang#147820.

I realized that when there was no intra-doc link linking to the same item, then the generated link for macros in jump to def would be invalid.

To make the code less redundant, I merged the "registering" of items and the href generation use the same code for macros.

r? `@notriddle`

bors added a commit that referenced this pull request

Nov 11, 2025
Rollup of 6 pull requests

Successful merges:

 - #147753 (Suggest add bounding value for RangeTo)
 - #148080 ([rustdoc] Fix invalid jump to def macro link generation)
 - #148465 (Adjust spans into the `for` loops context before creating the new desugaring spans.)
 - #148500 (Update git index before running diff-index)
 - #148536 (cmse: add test for `async` and `const` functions)
 - #148819 (Remove specialized warning for removed target)

r? `@ghost`
`@rustbot` modify labels: rollup

Zalathar added a commit to Zalathar/rust that referenced this pull request

Nov 11, 2025
… r=lolbinarycat

[rustdoc] Fix invalid jump to def macro link generation

Follow-up of rust-lang#147820.

I realized that when there was no intra-doc link linking to the same item, then the generated link for macros in jump to def would be invalid.

To make the code less redundant, I merged the "registering" of items and the href generation use the same code for macros.

r? ``@notriddle``

Zalathar added a commit to Zalathar/rust that referenced this pull request

Nov 11, 2025
… r=lolbinarycat

[rustdoc] Fix invalid jump to def macro link generation

Follow-up of rust-lang#147820.

I realized that when there was no intra-doc link linking to the same item, then the generated link for macros in jump to def would be invalid.

To make the code less redundant, I merged the "registering" of items and the href generation use the same code for macros.

r? ```@notriddle```

bors added a commit that referenced this pull request

Nov 12, 2025
Rollup of 12 pull requests

Successful merges:

 - #146627 (Simplify `jemalloc` setup)
 - #147753 (Suggest add bounding value for RangeTo)
 - #147974 (Improve diagnostics for buffer reuse with borrowed references)
 - #148080 ([rustdoc] Fix invalid jump to def macro link generation)
 - #148424 (bootstrap: Add snapshot tests for path-to-step handling)
 - #148500 (Update git index before running diff-index)
 - #148536 (cmse: add test for `async` and `const` functions)
 - #148770 (implement `feature(c_variadic_naked_functions)`)
 - #148819 (Remove specialized warning for removed target)
 - #148830 (miri subtree update)
 - #148833 (Update rustbook dependencies)
 - #148841 (Remove more `#[must_use]` from portable-simd)

r? `@ghost`
`@rustbot` modify labels: rollup

Zalathar added a commit to Zalathar/rust that referenced this pull request

Nov 12, 2025
… r=lolbinarycat

[rustdoc] Fix invalid jump to def macro link generation

Follow-up of rust-lang#147820.

I realized that when there was no intra-doc link linking to the same item, then the generated link for macros in jump to def would be invalid.

To make the code less redundant, I merged the "registering" of items and the href generation use the same code for macros.

r? ````@notriddle````

bors added a commit that referenced this pull request

Nov 12, 2025
Rollup of 16 pull requests

Successful merges:

 - #146627 (Simplify `jemalloc` setup)
 - #147753 (Suggest add bounding value for RangeTo)
 - #147832 (rustdoc: Don't pass `RenderOptions` to `DocContext`)
 - #147974 (Improve diagnostics for buffer reuse with borrowed references)
 - #148080 ([rustdoc] Fix invalid jump to def macro link generation)
 - #148465 (Adjust spans into the `for` loops context before creating the new desugaring spans.)
 - #148500 (Update git index before running diff-index)
 - #148531 (rustc_target: introduce Abi, Env, Os)
 - #148536 (cmse: add test for `async` and `const` functions)
 - #148770 (implement `feature(c_variadic_naked_functions)`)
 - #148780 (fix filecheck typos in tests)
 - #148819 (Remove specialized warning for removed target)
 - #148830 (miri subtree update)
 - #148833 (Update rustbook dependencies)
 - #148834 (fix(rustdoc): Color doctest errors)
 - #148841 (Remove more `#[must_use]` from portable-simd)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit that referenced this pull request

Nov 12, 2025
Rollup merge of #148080 - GuillaumeGomez:fix-jump-def-links, r=lolbinarycat

[rustdoc] Fix invalid jump to def macro link generation

Follow-up of #147820.

I realized that when there was no intra-doc link linking to the same item, then the generated link for macros in jump to def would be invalid.

To make the code less redundant, I merged the "registering" of items and the href generation use the same code for macros.

r? `````@notriddle`````

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Nov 12, 2025

Kobzol pushed a commit to Kobzol/rustc_codegen_cranelift that referenced this pull request

Dec 29, 2025

christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request

Jan 27, 2026

christian-schilling pushed a commit to christian-schilling/rustc_codegen_cranelift that referenced this pull request

Jan 27, 2026

Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request

Feb 3, 2026

Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request

Feb 3, 2026