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 should have more granular source links #9977

Closed
etrepum opened this issue Oct 20, 2013 · 7 comments
Closed

rustdoc should have more granular source links #9977

etrepum opened this issue Oct 20, 2013 · 7 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@etrepum
Copy link

etrepum commented Oct 20, 2013

As a very new user to Rust, I would find it incredibly helpful if source links were provided by rustdoc. Haskell's Haddock does this and I've found it really useful; here's an example of the output: http://lambda.haskell.org/platform/doc/current/ghc-doc/libraries/haskell2010-1.1.1.0/Prelude.html (see the "Source" link to the right of any function, type or typeclass).

@alexcrichton
Copy link
Member

rustdoc does actually have source links for things in the upper-right of every page (http://static.rust-lang.org/doc/master/std/index.html), but were you looking for more specific source links on certain items?

@sfackler
Copy link
Member

It could be nice to have more source links for things like methods and functions.

@alexcrichton
Copy link
Member

Adjusting title from "rustdoc should have source links" to what it currently is.

@etrepum
Copy link
Author

etrepum commented Oct 20, 2013

I didn't even notice that! However, these links don't go to where I would expect them to. All of the ones that I've clicked on take me to different lines in std.rs which isn't very useful behavior. For example http://static.rust-lang.org/doc/master/std/ascii/index.html the link goes to http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/doc/build/src/libstd/std.rs.html#125 but I would expect it to go to http://static.rust-lang.org/doc/master/src/std/home/rustbuild/src/rust-buildbot/slave/doc/build/src/libstd/str/ascii.rs.html

@etrepum
Copy link
Author

etrepum commented Oct 20, 2013

To answer your question, I am looking for more specific source links on certain items.

@etrepum
Copy link
Author

etrepum commented Oct 20, 2013

I might also suggest renaming [src] to [source]. There's a massive amount of whitespace nearby, not a whole lot of reason to abbreviate. Makes searching harder, unless you already know to look for src.

@emberian
Copy link
Member

Closing in favor of #12926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants