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

Allow deeply nested modules to be collapsed to a single page in rustdoc #5952

Closed
pcwalton opened this issue Apr 19, 2013 · 7 comments
Closed
Labels
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

@pcwalton
Copy link
Contributor

For deeply nested module structures like those of core::libc, having to click through all the time is terribly annoying. It would be nice to have an attribute that allows all the modules to be listed on one page.

@bstrie
Copy link
Contributor

bstrie commented Jun 6, 2013

From looking at the docs, it seems as though all the "nesting" modules contain nothing but other modules. Perhaps rather than an attribute we could simply have a rule that if a module's only exported items are other modules, we simply flatten it into a single page with its submodules.

@pnkfelix
Copy link
Member

Visiting for bug triage, email 2013-07-29.

@cmr: Can this be subsumed under rustdoc_ng? (Also, is there a metabug for rustdoc_ng?)

@emberian
Copy link
Member

@pnkfelix Yes, and no, but I'll open one: #8125

@emberian
Copy link
Member

@pcwalton would a tree browser as in #1960 (comment) be suitable for closing this?

@catamorphism
Copy link
Contributor

@cmr Any thoughts?

@emberian
Copy link
Member

emberian commented Nov 4, 2013

I agree that this should be done.

The best method would probably be a tree browser, ala http://docs.sencha.com/extjs/4.2.1/#!/api. Since rustdoc now handles reexports and links things properly (ex the libc doc page), I don't think this as important as it was with the old rustdoc.

@alexcrichton
Copy link
Member

I believe that this bug is describe the quite ancient old rustdoc at this point, not the rustdoc in its current revision.

The current rustdoc I don't believe is perfect in its design, but it doesn't suffer from this same problem the old rustdoc did. In lieu of closing old and crufty issues, I'm going to close this and leave room for a more specific bug targeted at today's rustdoc design.

flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 28, 2020
Added a lint which corrects expressions like (a - b) < f32::EPSILON, according to rust-lang#5819

Fixes rust-lang#5819
changelog: none
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 28, 2020
Corrects the float_equality_without_abs lint

Fixes an issue in the `float_equality_without_abs` lint. The lint suggestion was configured in a way that it lints the whole error and not just the subtraction part. In the current configuration the lint would suggest to change the expression in a wrong way, e.g.
```rust
let _ = (a - b) < f32::EPSILON; // before
let _ = (a - b).abs(); // after
```
This was dicovered by @flip1995. (See discussion of PR rust-lang#5952).

Also the suggestion is now formatted via `utils::sugg`.
changelog: none
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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants