| Age | Commit message (Collapse) | Author | Lines |
|
- section.sidebar -> nav.sidebar, also added an unordered list.
- div#help -> aside#help, also added a hidden heading.
- the current crate is now emphasized in the sidebar.
Fixes #16310.
|
|
|
|
|
|
|
|
Blurs the document's background when the help dialogue is present,
making the contents of the dialogue stand out more.
|
|
|
|
|
|
Yet another attempt to make the prose on the std crate page
clearer and more informative.
This does a lot of things: tightens up the opening, adds useful links
(including a link to the search bar), offers guidance on how to use
the docs, and expands the prelude docs as a useful newbie entrypoint.
r? @steveklabnik cc @aturon
|
|
|
|
|
|
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples.
Documentation:
```rust
pub struct String {
// some fields omitted
}
```
Playground:
```rust
Struct std::String
[−]
[src]
```
r? @steveklabnik
|
|
Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`. The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.
|
|
Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.
Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.
Also introduces closing apostrophes and ellipsis for search field
placeholder.
|
|
|
|
|
|
|
|
Sharpens the help dialogues edges by removing border-padding, which
matches better with the rest of the document.
Also increases somewhat the rounded edges of the key symbols to
make it clear they are symbols.
Also introduces closing apostrophes and ellipsis for search field
placeholder.
|
|
|
|
Fixes #26673
|
|
non-english keyboard layouts. Fixes #26016 Fixes #16572
|
|
Since the "Book" already avoids jQuery in its inline script tags and playpen.js is tiny, I figured I would convert it to plain old JS as well.
Side note: This is a separate issue, but another thing I noticed in my testing is that the "⇱" character doesn't display correctly in Chrome on Windows 7. (Firefox and IE work fine; other browsers not tested)
r? @steveklabnik
Edit: Github didn't like the "script" tag above
Edit 2: Actually, now IE seems to render "⇱" fine for me. Odd.
|
|
Fixes #26360.
|
|
It is still compatible with IE9+.
This removes the jQuery dependency from the "Book" entirely.
|
|
Method where clauses are put indented on a new line, do the same tweak
to free functions, which makes it cleaner and easier to read.
|
|
Closes #25167
|
|
|
|
There are more possible optimizations left (cached length in loops) as
well as some possible bugs (shadowed variables) to fix. This is mostly
syntactic.
|
|
Fixes #24655
Margin for associated types was applied to type aliases (in return
value) by mistake.
|
|
Rustdoc fixes for associated items
This is related to isssue #22442 and solves it partly.
This solves the search index links of associated types and constants,
so that they link to the trait page.
Also add an Associated Constants section if constants are present.
|
|
This is related to isssue #22442 and solves it partly.
This solves the links of associated types and constants, so that they
link to the trait page.
|
|
This style inconsistency was noted at https://travis-ci.org/rust-lang/rust/builds/61583070#L371
|
|
To separate concerns, instead of checking the state of `#toggle-all-docs` by looking at its label text, I add or remove a class `will-expand` depending on whether the button’s next click will expand everything. (The `if` statement’s two branches were swapped as part of this change.)
I moved the desired text values to a function `labelForToggleButton`, so changing the values will be easier. I also note in a comment the other file where the text is duplicated.
To allow the labels of both types of toggle buttons to be uniformly set, I added a `span.inner` to the global button too.
I split the template in `render.rs` into multiple lines to make room for the `span`, and that adds whitespace around the `[` and `]` text elements. That seems to be okay, though – the page still looks the same.
I updated the CSS styling for `.collapse-toggle > .inner` to add a little extra space around the symbol, to make minus signs easier to identify. (`#toggle-all-docs > .inner` does not need the same style, since its text size is bigger, so it naturally puts more space around the symbol.)
|
|
The cause of the problem is described here: https://github.com/rust-lang/rust/pull/24797#issuecomment-97049765 .
I tested this new `main.js` by changing the `main.js` content of a rendered docs page to this new content. The [−] button worked again.
|
|
Fixes #24441
Preview:

|
|
So that if people accidentally delete the character, they won’t re-type it as a hyphen, which would cause bugs.
I changed ‘+’ too, even though it won’t be re-typed incorrectly, so that it is easier to see when plus is used as a symbol for the button, and when it is used as an operator in code. It also makes it clearer that the use of an entity for minus is on purpose, so people won’t be tempted to replace the entity incorrectly with a hyphen character.
|
|
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
|
|
Fixes #24441
|
|
r? @alexcrichton (since you added `.stability` warning messages)
|
|
|
|
|
|
Whenever a type implements Deref, rustdoc will now add a section to the "methods
available" sections for "Methods from Deref<Target=Foo>", listing all the
inherent methods of the type `Foo`.
Closes #19190
|
|
The source filename for cross crate macros isn't quite right so the normal
generated links are invalid.
Closes #21311
|
|
This commit is an overhaul to how rustdoc deals with stability of the standard
library. The handling has all been revisited with respect to Rust's current
approach to stability in terms of implementation as well as the state of the
standard library today. The high level changes made were:
* Stable items now have no marker by default
* Color-based small stability markers have been removed
* Module listings now fade out unstable/deprecated items slightly
* Trait methods have a separate background color based on stability and also
list the reason that they are unstable.
* `impl` blocks with stability no longer render at all. This may be re-added
once the compiler recognizes stability on `impl` blocks.
* `impl` blocks no longer have stability of the methods implemente indicated
* The stability summary has been removed
Closes #15468
Closes #21674
Closes #24201
|
|
Only '?' should do that.
Fixes #24289.
|
|
If a result is highlighted, when the search changes that state should no
longer be highlighted. Fixes #24044
cc @steveklabnik
|
|
If a result is highlighted, when the search changes that state should no
longer be highlighted. Fixes #24044
cc @steveklabnik
|
|
Validate if the description is available in the rawSearchIndex
|
|
Fixes #23397
|
|
|
|
|