Intra-doc links do not support disambiguating methods overloaded with generics #93398
Labels
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Hello all! I couldn't find any tickets that discuss this problem, so hopefully this isn't a duplicate report.
I'm experimenting with the typestate pattern, where I'm using it in a builder to cascade a series of transformations. Here's a simple version:
It seems though that rustdoc does not handle overloading the name particularly well. When running
cargo doc
, the documentation for theCalculator<Add>::done()
just links to itself, rather than the doc onCalculator<Mul>::done()
. I'm guessing it's just stripping out the type parameter and linking to the first entry.I expected to see this happen:
I hoped that we could link to the doc comment on the overloaded method
Instead, this happened:
rustdoc linked to the first method's comment.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: