Files
rust/tests/rustdoc-html
Guillaume Gomez e219d6134b Rollup merge of #158089 - GuillaumeGomez:jump-to-def-derive, r=Urgau
Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro

Fixes https://github.com/rust-lang/rust/issues/158050.

The problem is that the proc-macros might generate an impl block `impl $(trait)? for Item` where `Item` then has its span pointing to the current item, overwriting its intra-doc link (hopefully this explanation makes sense ^^').

In short, the proc-macro generates an impl block, the `for Item` makes the code enter `visit_qpath` which in turn calls `handle_path` which will take the span of the last segment of the path (so `Item` here) and use it in the link def "span map".

r? @urgau
2026-06-18 20:30:32 +02:00
..
2026-06-12 19:11:22 -04:00
2026-04-01 23:05:42 +01:00
…
2026-02-24 11:41:26 -05:00
2026-06-07 11:06:19 +03:00
…
…
…
…
2026-06-07 13:58:33 -04:00
…
…
…
…
…
…
2026-02-10 18:00:54 +00:00
…
…