Update cargo
10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000
- Take priority into account within the pending queue (rust-lang/cargo#11032)
- fix(add): Clarify which version the features are added for (rust-lang/cargo#11075)
- doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079)
- Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023)
- Don't use `for` loop on an `Option` (rust-lang/cargo#11081)
- Remove dead code (rust-lang/cargo#11080)
- Change progress indicator for sparse registries (rust-lang/cargo#11068)
- chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055)
- Cache index files based on contents hash (rust-lang/cargo#11044)
- fix: specifies the max length for crate name (rust-lang/cargo#11051)
Rustdoc-Json: Don't loose subitems of foreign traits.
Previously, we'd clone the index, and extend it with foreign traits. But when doing this, traits would render their subitems without them going into the index being used in the output leading to dangling ID's.
r? `@GuillaumeGomez`
rustdoc: remove no-op CSS `.search-results .result-name > span`
The rule `display: inline-block` was added in 5afa52bc7d. The `margin: 0` and `font-weight: normal` were added in c01bd560e2.
Both seem to have been added to override class-based rules that were targetted at method sections. See <c01bd560e2/src/librustdoc/html/static/rustdoc.css (L140-L148)> for an example. The selectors that these were meant to override were changed in a8318e420d and 76a3b609d0 to be more specific, so they no longer need to be overridden.
10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63
2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000
- Take priority into account within the pending queue (rust-lang/cargo#11032)
- fix(add): Clarify which version the features are added for (rust-lang/cargo#11075)
- doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079)
- Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023)
- Don't use `for` loop on an `Option` (rust-lang/cargo#11081)
- Remove dead code (rust-lang/cargo#11080)
- Change progress indicator for sparse registries (rust-lang/cargo#11068)
- chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055)
- Cache index files based on contents hash (rust-lang/cargo#11044)
- fix: specifies the max length for crate name (rust-lang/cargo#11051)
The `.content table` / `.content td` / `.content tr` family of selectors date
back to 4fd061c426, when module indexes and
other parts of rustdoc used `<table>` tags for layout and content
presentation. The `.content td h1, .content td h2` has only been changed
since then to tweak the font size in
dd5ff428ed.
4fd061c426/src/rustdoc_ng/html/static/main.css (L155-L162)
This CSS would have affected:
* search result tables, which were removed in
b615c0c854
* module item tables, which were removed in
6020c79dde
* docblock tables from markdown, which still exist
It may also have affected a few other tables over the last decade, but
they've been gradually replaced with grid layouts and flexbox to make layouts
that work better on narrow viewports. For example,
34bd2b845b.
These rules have no affect on the appearance of docblock tables
===============================================================
.content table {
border-spacing: 0 5px;
}
According to MDN, [border-spacing] only has an effect when `border-collapse`
is `separate`. However, `border-collapse: collapse` is set globally for all
tables, so this rule does nothing.
[border-spacing]: https://developer.mozilla.org/en-US/docs/Web/CSS/border-spacing
.content td p:first-child { margin-top: 0; }
Tables with paragraphs in them are impossible without dropping down to raw
HTML. Also, the rustdoc stylesheet sets paragraphs to have no top margin
anyway, so this rule is a no-op.
.content td h1, .content td h2 { margin-left: 0; font-size: 1.125rem; }
Tables with headers in them are impossible without dropping down to raw HTML.
This is considered unlikely, especially since it looks weird right now
(`.docblock h2` has an underline that is redundant with the table cell's own
border).
.content tr:first-child td { border-top: 0; }
This has no effect because of border collapsing.
This rule is removed, because tables look fine without it
=========================================================
.content td:first-child { padding-right: 20px; }
By removing this rule, the first cell in each row has the same padding as all
other cells in the row.
This rule is kept, and converted to directly target `.docblock`
===============================================================
.content td { vertical-align: top; }
Removing this rule would cause it to be aligned to the middle instead.
At the time this CSS was added, it was just `span.since`, because the
version info could be rendered in two different ways:
1. `<div class='since'>` was used for associated items like methods. It
was absolutely positioned, and the selector in rustdoc.css that
targetted it was just `.since`.
a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L522-L529)
2. `<span class='since'>` was introduced in
a5a2f2b951 for page-global version info,
so that it could be laid out alongside the `[-]`/`[+]` button. This CSS
rule was added to override the absolute position introduced in (1).
a5a2f2b951/src/librustdoc/html/static/rustdoc.css (L637-L641)
The selector was changed in 8fc6e420d1 so
that everything could use a `<span>` tag, but the dichotomy of the
absolutely-positioned version info for associated items and the static
positioned item version info remained.
The absolutely positioned `.since` was changed to one nested below a
`<div class="rightside">` container in
5de1391b88, so the version information is now
always statically-positioned, and, as described in the commit message,
"their DOM representation is consistent."
Make `compare_predicate_entailment` no longer a query
Make `compare_predicate_entailment` so it's no longer a query (again), and splits out the new logic (that equates the return types to infer RPITITs) into its own query. This means that this new query (now called `collect_trait_impl_trait_tys`) is no longer executed for non-RPITIT cases.
This should improve perf (https://github.com/rust-lang/rust/pull/101224#issuecomment-1241682203), though in practice we see that these some crates remain from the primary regressions list on the original report... They are all <= 0.43% regression and seemingly only on the incr-full scenario for all of them.
I am at a loss for what might be causing this regression other than what I fixed here, since we don't introduce much new non-RPITIT logic except for some `def_kind` query calls in some places, for example, like projection. Maybe that's it?
----
Originally this PR was opened to test enabling `cache_on_disk` (62164aaaa11) but that didn't turn out to be very useful (https://github.com/rust-lang/rust/pull/101615#issuecomment-1242403205), so that led me to just split the query (and rename the PR).
rustdoc: remove redundant CSS `#source-sidebar, #sidebar-toggle`
These two elements are always nested below `<nav class="sidebar">`, and will inherit the font from their parent.
These selectors were added in 93520d2ad1, and became redundant in 07e3f998b1 when the source sidebar elements became nested below `nav.sidebar`.
Avoid `Iterator::last`
Adapters like `Filter` and `Map` use the default implementation of `Iterator::last` which is not short-circuiting (and so does `core::str::Split`). The predicate function will be run for every single item of the underlying iterator. I hope that removing those calls to `last` results in slight performance improvements.