| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
[rustdoc] Copy only item path to clipboard rather than full `use` statement.
The (somewhat) recent addition of the "copy item import to clipboard" button is extremely nice.
However, i tend to write my code with fully qualified paths wherever feasible and only resort to `use` statements as a refactoring pass. This makes the "copy to clipboard" workflow awkward to use, as i would be copy-pasting that as, say
```rust
impl use std::ops::Add; for MyType {
```
and then go back and remove the `use ` and `;`.
This PR removes the `use ;` decorations, making it much nicer to use for fully-qualified items. I argue, however, that this does not noticeably degrade experience for those who prefer to import items, since the hard part about those is getting the path right, and writing the `use ;` decoration can be done by hand with little effort.
|
|
Part of #87059
Partially reverts #84703
Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
|
|
In #86157
cd0f93193c84ddc6698f9b65909da71c084dcb74
Use Tera templates for rustdoc.
dropped the following transformation from the keys of the default
settings element's `data-` attribute names:
.map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v)))
The `Escape` part is indeed no longer needed, because Tera does that
for us. But the massaging of `-` to `_` is needed, for the (bizarre)
reasons explained in the new comments.
I have tested that the default theme function works again for me. I
have also verified that passing
--default-theme="zork&"
escapes the value in the HTML.
Closes #87263.
CC: Jacob Hoffman-Andrews <github@hoffman-andrews.com>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
Fix implementors display
Part of https://github.com/rust-lang/rust/issues/86632.
This PR does a few things:
* It fixes of the JS rendered implementors.
* It generates anchors for JS rendered implementors to make it coherent with the others.
* It adds a test to ensure that we won't have the same issue again.
* It changes the way we render the rustdoc-gui crates to simplify it a bit and also to allow to have dependencies without going through compiletest.
Before:

After:

I plan to add the `[src]` links in another PR because this one is already big enough.
cc `@Mark-Simulacrum` (for the bootstrap changes)
r? `@Nemo157`
|
|
This function was used in an earlier version, when idx's were used
to serialize function inputs and outputs. That's not done any more,
so removed the JS-side support for it.
|
|
|
|
|