-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: Fix a number of low-hanging-fruit problems #24177
Conversation
Add a new test directory called 'rustdoc' where all files inside are documented and run against the `htmldocck` script to have assertions about the output.
This ensures that all external traits are run through the same filters that the rest of the AST goes through, stripping hidden function as necessary. Closes rust-lang#13698
This ensures that def ids don't drift too much over time. Closes rust-lang#15309
If an empty public module has no documentation, it shouldn't emit a page that's just a redirect loop to itself! Closes rust-lang#16265
All methods listed in "Trait Implementations" now hyperlink to the source trait instead of themselves, allowing easy browsing of the documentation of a trait method. Closes rust-lang#17476
This adds support in rustdoc to blanket apply crate attributes to all doc tests for a crate at once. The syntax for doing this is: #![doc(test(attr(...)))] Each meta item in `...` will be applied to each doctest as a crate attribute. cc rust-lang#18199
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes rust-lang#18199
This renders a "Methods" and "Trait Implementations" section for each item implemented for a bare trait itself. Closes rust-lang#19055
It's somewhat common to impl traits for `&T` and `&mut T` so show these on the pages for `T` to ensure they're listed somewhere at least. Closes rust-lang#20175
Add a custom module to rustdoc which simplifies the output of `middle::ty` into a more readable form which tends to be written down anyway! Closes rust-lang#20646
* All bounds are now discovered through the trait to be inlined. * The `?Sized` bound now renders correctly for inlined associated types. * All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a hyperlink to the trait `B`. This should improve at least how the docs look at least. * Supertrait bounds are now separated and display as the source lists them. Closes rust-lang#20727 Closes rust-lang#21145
Had to fix a bug in `--markdown-playground-url` for markdown files in rustdoc as well as adding some necessary JS to the rustbook output as well. Closes rust-lang#21553
This change is aimed at improving cross-crate (inlined) notation of generic closures. The change modifies `simplify::where_predicates` to handle parenthesized notation as well as starting to handle supertrait bounds as well. This was necessary because all output constraints of closures are bound to `FnOnce` but most trait bounds are that of `FnMut`. Close rust-lang#21801
This commit ensures that the ABI of functions is propagated all the way through to the documentation. Closes rust-lang#22038
This commit ceases documentation-by-default of crates such as `term`, `serialize`, and `alloc`. Crates like `term` and `rand` have duplicates on `crates.io` and the search index entries generated in the local tree end up only leading to confusion. Crates like the entire compiler infrastructure, `flate`, or `rbml` don't need to be documented in such a prominent location. This change also means that doc tests will no longer be run for crates beyond the facade (e.g. `serialize` or `term`), but there were very few doc tests in there to begin with. Closes rust-lang#22168
Right now rustdoc replaces the string ".md)" with ".html)" to fix links between markdown files, so use a different syntax that doesn't get caught in the crossfire. Closes rust-lang#22900
Strip them from output like other `# `-starting lines. Closes rust-lang#23106
This ends up causing duplicate output in rustdoc. The source of these duplicates is that the item is defined in both resolve namespaces, so it's listed twice. Closes rust-lang#23207
Make the structure more amenable to what rustdoc is expecting to ensure that everything renders all nice and pretty in the output. Closes rust-lang#23705 Closes rust-lang#23910
These traits are currently all just unstable parts of the facade which are implementation details for primitives further up the facade. This may make it more difficult to find what set of methods you get if only linking to libcore, but for now that's also unstable behavior. Closes rust-lang#22025
The set of types which can have an inherent impl changed slightly and rustdoc just needed to catch up to understand what it means to see a `impl str`! Closes rust-lang#23511
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable). I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
⌛ Testing commit 3df822f with merge 1d60995... |
⛄ The build was interrupted to prioritize another pull request. |
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable). I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
⛄ The build was interrupted to prioritize another pull request. |
This seems to break android (but not the others) http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/4360/steps/test/logs/stdio |
@bors: r=aturon |
@bors: r=aturon 518f9a4 |
⌛ Testing commit 518f9a4 with merge fd996e6... |
💔 Test failed - auto-win-64-nopt-t |
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable). I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
Wooooooo! 🎊 |
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable).
I've uploaded a copy of the documentation generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.