| Age | Commit message (Collapse) | Author | Lines |
|
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>
|
|
rustdoc: show count of item contents when hidden
Resolves #85494
|
|
Fix docblock <table> overflow
Before:

After:

cc `@SergioBenitez`
r? `@notriddle`
|
|
Fix "item info" width
Fixes #87202.
It now looks again like this:

cc `@jyn514`
r? `@notriddle`
|
|
|
|
|
|
|
|
Part of #87059
Preview it at: https://notriddle.com/notriddle-rustdoc-test/rustdoc-sidebar-header/std/index.html
|
|
r=GuillaumeGomez
feat(rustdoc): open sidebar menu when links inside it are focused
Fixes #87172
Based on #87167 (which should be merged first)
r? ``@GuillaumeGomez``
Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
|
|
Fixes #87172
Based on #87167 (which should be merged first)
Preview it at https://notriddle.com/notriddle-rustdoc-test/std/index.html
Co-authored-by: Guillaume Gomez <guillaume.gomez@huawei.com>
|
|
Rollup of 7 pull requests
Successful merges:
- #86983 (Add or improve natvis definitions for common standard library types)
- #87069 (ExprUseVisitor: Treat ByValue use of Copy types as ImmBorrow)
- #87138 (Correct invariant documentation for `steps_between`)
- #87145 (Make --cap-lints and related options leave crate hash alone)
- #87161 (RFC2229: Use the correct place type)
- #87162 (Fix type decl layout "overflow")
- #87167 (Fix sidebar display on small devices)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix sidebar display on small devices
Part of #87059.
Instead of hiding the sidebar on small devices, we instead move it out of the viewport so that it remains "visible" to our text only users.
Could you confirm it works for you `@ahicks92` and `@DataTriny` please? You can give it a try at [this URL](https://guillaume-gomez.fr/rustdoc-test/test_docs/index.html).
r? `@notriddle`
|
|
Fix type decl layout "overflow"
Before:

After:

cc ```@SergioBenitez```
r? ```@notriddle```
|
|
fix dead link for method in trait of blanket impl from third party crate
fix #86620
* changes `href` method to raise the actual error it had instead of an `Option`
* set the href link correctly in case of an error
I did not manage to make a small reproducer, I think it happens in a situation where
* crate A expose a trait with a blanket impl
* crate B use the trait from crate A
* crate C use types from crate B
* building docs for crate C without dependencies
r? `@jyn514`
|
|
|
|
|
|
|
|
|
|
Fix Ayu theme <code> color
Fixes #87072 (the second regression).
r? `@notriddle`
|
|
Fix codeblocks overflow
Fixes #87043.
Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.
r? `@Nemo157`
|
|
|
|
|
|
|
|
|
|
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`
|
|
Fix rendering of reexported macros 2.0 and fix visibility of reexported items
So, this PR grew a bit out of focus, it does the following things:
* Fixes #86276.
* Fixes visibility display for reexported items: it now takes the visibility of the "use" statement rather than the visibility of the reexported item itself).
* Fixes the display of reexported items if "--document-private-items" option is used. Before, they were simply skipped.
* Fixes inconsistency on typedef items: they didn't display their visibility contrary to other items.
I added tests to check everything listed above.
cc `@camelid` `@ollie27` (in case one of you want to review?)
r? `@jyn514`
|
|
|
|
|
|
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.
|
|
|
|
Fix small headers display
You can see it on the `IoSlice` or on the `ErrorKind` pages.
Before:


After:


r? `@Nemo157`
|
|
|
|
|
|
|
|
|
|
Clean up rustdoc IDs
I cherry-picked the commit from https://github.com/rust-lang/rust/pull/86178. It adds missing rustdoc IDs (for the HTML) and remove unused ones.
cc `@camelid`
r? `@jyn514`
|
|
|
|
|
|
|
|
This reverts commit 41a345d4c46dad1a98c9993bc78513415994e8ba.
|
|
|
|
|
|
|
|
Use rustdoc.css for error index
Closes #86512.
|
|
|
|
This commit adds a test case for generics, re-adds generics data
to the search index, and tweaks function indexing to use less space in JSON.
This reverts commit 14ca89446c076bcf484d3d05bd991a4b7985a409.
|
|
Fix rustdoc query type filter
I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659.
r? `@notriddle`
|
|
|
|
Fix boldness (put it back where needed)
I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
|
|
|