rustdoc intra-doc links cannot disambiguate inherent methods on generic types #85960
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
In this example, there are two implementations of
My::foo
for specific instantiations of the parameter. These both show up in the page forstruct My
, which is fine, I guess, and the links to the two methods are respectivelystruct.My.html#method.foo
andstruct.My.html#method.foo-1
, so the URL scheme has difficulty with differentiating them. But I don't think intra-doc links have any analogous way to disambiguate these kinds of methods, and the substitution syntaxMy<A>::foo
doesn't seem to work (it assumes thatA
is a type variable, not a struct).This is similar to issues #74563 and #62834, and the (incorrectly closed) #54172 is about the version of this issue for trait impls, but here it's just inherent methods for different substitutions and/or type aliases. (I would like to use the type alias in the doc link, but really any way to refer to both items in the presence of this kind of ambiguity would be great.)
The text was updated successfully, but these errors were encountered: