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

List re-exports of a symbol in the documentation for that symbol #13414

Closed
Meyermagic opened this issue Apr 9, 2014 · 3 comments
Closed

List re-exports of a symbol in the documentation for that symbol #13414

Meyermagic opened this issue Apr 9, 2014 · 3 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

@Meyermagic
Copy link
Contributor

I find myself accidentally re-importing things already in prelude, or using a deeper, explicit, path for something re-exported elsewhere pretty often.

When navigating the documentation via search, I'll jump directly to a sub-module or symbol, and import and use it without noticing I already have, say, std::io imported. Then I'll be using fs::File and, say, io::BufferedReader, when I could have cleaner import paths.

Overall, I think it might help new users become familiar with the standard library layout. The main downside I see is unnecessary clutter in the documentation pages, and obviously more code to maintain.

A lint might also work, although there are definitely cases where "use the shortest import path" probably isn't what you want.

@huonw huonw added the A-rustdoc label Apr 9, 2014
@steveklabnik steveklabnik added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Apr 30, 2015
@steveklabnik
Copy link
Member

Triage: I don't think Rustdoc currently has a way of understanding a 'canonical' source for something...

@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

Triage: there's been no substantial comments on this in the last four years; I don't think this is going to be implemented. Closing!

bors added a commit to rust-lang-ci/rust that referenced this issue Oct 18, 2022
minor: Bump `Swatinem/rust-cache` to move off Node 12
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

Successfully merging a pull request may close this issue.

3 participants