Open
Description
This is case three from #74489.
If a type implements a trait that's generic and implemented multiple times with different generic parameters, then rustdoc generates the same link for each. For example, [String::from]
resolves to https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#method.from.
However, every From
implementation on String
has a method called from! So the browser picks a random one.
This requires two fixes:
- Handle fully-qualified syntax in intra doc links #74563, so the different implementations can be distinguished in the link
- rustdoc needs to change the
#method.from
it generates to distinguish the different functions in the browser
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
camelid commentedon Dec 17, 2021
cc #92052
lolbinarycat commentedon Nov 7, 2024
took a shot at the second part, in theory it should be pretty easy to just prepend the impl disambiguator, but i can't find the code that generates the fragment just by traversing the call graph.