Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc does not add tooltips for reference links #89246

Closed
jyn514 opened this issue Sep 25, 2021 · 5 comments
Closed

Rustdoc does not add tooltips for reference links #89246

jyn514 opened this issue Sep 25, 2021 · 5 comments
Assignees
Labels
A-markdown-parsing Area: Markdown parsing for doc-comments 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.

Comments

@jyn514
Copy link
Member

jyn514 commented Sep 25, 2021

In general, links generated by rustdoc do have a tooltip.

E.g. something like

/// Talking about [`Result`][std::fmt::Result] here!
pub mod m {}

will come with a tooltip

Screenshot_20210906_223756

Whereas (unfortunately) the following alternative

/// Talking about [`Result`] here!
/// 
/// [`Result`]: std::fmt::Result
pub mod m {}

creates almost the same documentation, just lacking the tooltip.

Originally posted by @steffahn in #88343 (comment)

@jyn514 jyn514 added A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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. labels Sep 25, 2021
@GuillaumeGomez
Copy link
Member

I'll fix it tomorrow.

@GuillaumeGomez GuillaumeGomez self-assigned this Sep 27, 2021
@jyn514 jyn514 added A-markdown-parsing Area: Markdown parsing for doc-comments and removed A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Sep 27, 2021
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Sep 28, 2021

So, I think here that this is a markdown issue rather than a rustdoc issue. For example, there isn't a title there either:

/// [`Result`](std::result::Result)

Do you want us to add the title if there isn't one which will be the path to the type?

@camelid
Copy link
Member

camelid commented Oct 18, 2021

Hmm, but shouldn't inline links and link definitions be treated the same by rustdoc?

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Oct 18, 2021

That's a different question. I think it would be a nice add though.

@GuillaumeGomez
Copy link
Member

It was fixed in #108025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-markdown-parsing Area: Markdown parsing for doc-comments 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.
Projects
None yet
Development

No branches or pull requests

3 participants