| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Fix anchor invalid redirection to search
Fixes #41933.
r? @rust-lang/docs
|
|
rustdoc: Break words in the location box of the sidebar.
This prevents long names from overflowing.
Before:

After:

|
|
|
|
This prevents long names from overflowing.
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #40724
|
|
|
|
Fixes #40459
|
|
|
|
Makes the sidebar a light grey and highlights the currently viewed item
in the sidebar more prominently.
All visual design credit goes to @johnwhelchel (#37856)
|
|
|
|
|
|
rustdoc: Fix invalid HTML in stability notices
`em` tags cannot contain `p` tags so use `div`s instead of `em`s as the Markdown will create `p` tags.
|
|
Don't @import normalize.css.
This lets the browser load both files in parallel instead of waiting for `rustdoc.css` to load first.
|
|
rustdoc: Fix short summaries in search results
They should be run through a Markdown renderer in rustdoc to remove
links.
This also fixes the mouse over text for the Crates list on the sidebar.
[before](https://doc.rust-lang.org/nightly/std/index.html?search=ord) [after](https://ollie27.github.io/rust_doc_test/std/index.html?search=ord)
|
|
|
|
`em` tags cannot contain `p` tags so just use a `div` instead.
|
|
They should be run through a Markdown renderer in rustdoc to remove
links.
This also fixes the mouse over text for the Crates list on the sidebar.
|
|
In some versions of this font the ampersands are drawn badly.
|
|
|
|
rustdoc: fold fields for enum struct variants into a docblock
Per discussion in #37500, this PR updates the enum rendering code to wrap variants with named struct fields in a `docblock` span that is hidden automatically upon load of the page. This gives struct variant fields a clean separation from other enum variants, giving a boost to the readability of such documentation. Preview output is available [on the issue page](https://github.com/rust-lang/rust/issues/37500#issuecomment-260069269), but for the sake of completeness I'll include the images here again.

When you initially load the page, there's a line under variants with struct fields letting you know you can click to expand the listing.

If you click to expand, the header and table unfold into a nicely-indented listing.
If you want to take a look in your own browser and screen size, [I've got this version hosted on my server](https://shiva.icesoldier.me/doctest/doctest/enum.OldTopicRemoval.html).
Fixes #37500
r? @GuillaumeGomez
|
|
|
|
rustdoc: add line breaks to where clauses a la rustfmt
Much like my last PR for rustdoc (#36679), this adds line breaks to certain statements based on their line length. Here the focus was on where clauses.
Some examples:
- [Where clause in a trait function](https://shiva.icesoldier.me/custom-std/std/iter/trait.Iterator.html?search=#method.unzip) (also in the trait header block at the top of the page)
- [Where clause on a bare function](https://shiva.icesoldier.me/doc-custom2/petgraph/visit/fn.depth_first_search.html)
- [Where clauses in trait impls on a struct](https://shiva.icesoldier.me/custom-std/std/collections/struct.HashMap.html) (scroll to the bottom) These are regularly not on their own line, but will be given their own line now if their "prefix text" doesn't give them enough room to sensibly print their constraints. HashMap's trait impls provide some examples of both behaviors.
The libstd links above are the whole docs rendered with this, and the "bare function" link above is in another set that pulls some notable crates together. `petgraph` was the one that brought this request up, and that collection also includes [itertools](https://shiva.icesoldier.me/doc-custom2/itertools/trait.Itertools.html) which provided an easy sample to test with.
r? @GuillaumeGomez
|
|
|
|
|
|
The main change is to stop using javascript to generate the URLs and use
rustdoc instead.
This also adds run buttons to the error index examples.
|
|
|
|
|
|
The idea was proposed by eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
|
|
Fixes run button appearing when it shouldn't
Fixes #36621.
r? @steveklabnik
|
|
|
|
|
|
rustdoc css: Put `where` in trait listings on a new line
This is about the gray area at the top of a trait's documentation page,
that lists all methods and their signatures. A big trait page like
Iterator is very crowded without this tweak.
|
|
This is about the gray area at the top of a trait's documentation page,
that lists all methods and their signatures. A big trait page like
Iterator is very crowded without this tweak.
|
|
|
|
|
|
|
|
In CSS 2.1, any @import rules must precede all other rules (except the
@charset rule, if present).
|
|
rustdoc: don't collapse `docblock-short`

|
|
|
|
|
|
|
|
|
|
rustdoc: Fix a couple of issues with the search results
* Fix links to static items in the search results.
* Don't include the path for primitive methods in the search results. Displaying `std::u32::max_value` is misleading so just display `u32::max_value`.
|