| Age | Commit message (Collapse) | Author | Lines |
|
rustdoc: Note in a type's layout/size if it is uninhabited
Closes #87008

|
|
This avoids a subtle layout shift when switching from the crate page
to all items.
|
|
|
|
|
|
rustdoc: simplify DOM for `.item-table`
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
|
|
in metadata
|
|
|
|
rustdoc: Use more let chain
Got the idea after yesterday's review.
r? `@notriddle`
|
|
|
|
Remove some superfluous type parameters from layout.rs.
Specifically remove V, which can always be VariantIdx, and F, which can always be Layout.
|
|
$ wc -c search-index.old.js search-index.new.js
3940530 search-index.old.js
3843222 search-index.new.js
((3940530-3843222)/3940530)*100 = 2.47%
$ wc -c search-index.old.js.gz search-index.new.js.gz
380251 search-index.old.js.gz
379434 search-index.new.js.gz
((380251-379434)/380251)*100 = 0.214%
|
|
r=GuillaumeGomez
rustdoc: merge doctest tooltip with notable traits tooltip
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
<details><summary>a user report where the tooltip arrow overlaps the text</summary>

</details>
Fixes #91100
Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing>
Screenshot:

|
|
notriddle:notriddle/intra-doc-link-meta-description, r=camelid,GuillaumeGomez
rustdoc: account for intra-doc links in `<meta name="description">`
Similar to #86451, but for the SEO descriptions instead of the search descriptions.
|
|
|
|
r=GuillaumeGomez
rustdoc: clean up `write!` calls with less stuttering
|
|
r=GuillaumeGomez
rustdoc: remove inconsistently-present sidebar tooltips
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Inconsistent.20sidebar.20tooltips/near/323565625
|
|
rustdoc: remove unused fn parameter `tab`
|
|
|
|
rustdoc: use the same URL escape rules for fragments as for examples
Carries over improvements from #107284
|
|
|
|
This switches from using `<div>` to the more semantic `<ul>`, and
using class names that rhyme with the classes the search results
table uses.
|
|
rustdoc: fix item-spacer
rustdoc: use proper comment style
rustdoc: change formatting where clauses for traits
rustdoc: remove semicolon from provided methods
update provided methods formatting
|
|
|
|
Replace nbsp in all rustdoc code blocks
Based on #106125 by `@dtolnay` — this PR fixes the line wrapping bug.
Fixes #106098. This makes code copyable from rustdoc rendered documentation into a Rust source file.
|
|
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
|
|
r=notriddle,petrochenkov
Fix handling of items inside a `doc(hidden)` block
Fixes #106373.
cc `@aDotInTheVoid`
r? `@notriddle`
|
|
Fixes #93393
|
|
Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Inconsistent.20sidebar.20tooltips/near/323565625
|
|
rustdoc: remove meta keywords from HTML
Discussed in <https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.60.3Cmeta.20name.3D.22keywords.22.3E.60>
|
|
Discussed in
<https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.60.3Cmeta.20name.3D.22keywords.22.3E.60>
|
|
|
|
Stopped being used in CSS with
73d0f7c7b68784f1db0a1f53855c20d118a7e8b0
|
|
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
Fixes #91100
|
|
|
|
r=GuillaumeGomez
rustdoc: remove mostly-unused CSS classes `import-item` and `module-item`
|
|
|
|
The ordering in item tables was flipped in 3030cbea957adbd560bf2eaa34c1b8a56daee16a, making it
inconsistent with the ordering in method signatures.
Compare these:
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
|
|
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
|
|
Specifically remove V, which can always be VariantIdx, and F, which can
always be Layout.
|
|
This reverts commit eb93d1bedeab64c6f5d661df6a309a5b8a9273ca.
|
|
Various cleanups around pre-TyCtxt queries and functions
part of #105462
based on https://github.com/rust-lang/rust/pull/106776 (everything starting at [0e2b39f](https://github.com/rust-lang/rust/pull/106810/commits/0e2b39fd1ffde51b50d45ccbe41de52b85136b8b) is new in this PR)
r? `@petrochenkov`
I think this should be most of the uncontroversial part of #105462.
|
|
r=GuillaumeGomez
rustdoc: remove redundant item kind class from `.item-decl > pre`
This class originated in the very first commit of `rustdoc_ng`, and was used to add a color border around the item decl based on its kind.
https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106
The item decl no longer has a border, and there aren't any kind-specific styles in modern rustdoc's rendering of this UI item.
Most of this PR is updating test cases so that they use `item-decl` to find the `<pre>` tag instead of relying on the fact that the class name had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
|
|
|
|
|
|
This class originated in the very first commit of `rustdoc_ng`, and was used
to add a color border around the item decl based on its kind.
https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106
The item decl no longer has a border, and there aren't any
kind-specific styles in modern rustdoc's rendering of this UI item.
Most of this commit is updating test cases so that they use `item-decl` to
find the `<pre>` tag instead of relying on the fact that the class name
had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
|
|
rustdoc: few small cleanups
|
|
r=GuillaumeGomez
rustdoc: remove `docblock` class from notable trait popover
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl.
Fixes #92974
|
|
rustdoc: remove unnecessary DOM class `h1.fqn`
It's misleading. The main heading sometimes isn't an fully qualified name at all.
It's also redundant. It's always a child of `div.main-heading`, so just use that.
|
|
This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes
the `docblock` class from the All Items page, and
9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class
from the item decl.
Fixes #92974
|
|
This swaps things around so that the class that gets used more often has
the shorter name.
|