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

Add id values to rustdoc source view for convenient linking #25189

Closed
jdm opened this issue May 7, 2015 · 9 comments
Closed

Add id values to rustdoc source view for convenient linking #25189

jdm opened this issue May 7, 2015 · 9 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jdm
Copy link
Contributor

jdm commented May 7, 2015

It would be really nice to provide stable links in the source view for generated documentation. I envision providing ids for thinks like data types and function names, and perhaps method implementations; these would need to remain stable as long as the type names involved did not change.

@jdm jdm added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 7, 2015
@jdm
Copy link
Contributor Author

jdm commented May 7, 2015

As an example, http://doc.servo.org/src/script/dom/document.rs.html#struct-Document could link to the opening line of the declaration of the Document struct, by changing <span class='ident'>Document</span> to <span class='ident' id='struct-Document'>Document</span>.

@steveklabnik steveklabnik added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Nov 15, 2016
@steveklabnik
Copy link
Member

Triage: no change

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@steveklabnik
Copy link
Member

The line number is linkable; it's not quite the same thing. @rust-lang/rustdoc is this a feature we'd consider adding? It seems like a marginal improvement to me.

@GuillaumeGomez
Copy link
Member

Ids have been somewhat stable for quite some time now, aren't they?

@steveklabnik
Copy link
Member

steveklabnik commented Sep 24, 2018 via email

@GuillaumeGomez
Copy link
Member

In the source view, the ids are literally line numbers.

@steveklabnik
Copy link
Member

Right, this ticket is asking for

I envision providing ids for thinks like data types and function names, and perhaps method implementations;

in addition to that.

@GuillaumeGomez
Copy link
Member

I have difficulties to understand what need it would fulfil...

@jdm
Copy link
Contributor Author

jdm commented Sep 25, 2018

Me too! No need to debate this further; github links to specific revisions work fine.

@jdm jdm closed this as completed Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. 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