mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 09:47:57 +00:00
[rustdoc] Correctly handle intra-doc links on inlined same item with different names Fixes https://github.com/rust-lang/rust/issues/136777. It works as follow: we keep the `DefId` indexing, but we add a new `alternatives` entry (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