Commit Graph

200003 Commits

Author SHA1 Message Date
Jack Huey
c75817b0a7 Better errors for implied static bound 2022-09-13 20:18:04 -04:00
Jack Huey
ff623ffc39 Cleanup retrieve_closure_constraint_info 2022-09-13 19:58:53 -04:00
Jack Huey
2be6301857 Remove unused body args 2022-09-13 19:58:53 -04:00
bors
88a192257c Auto merge of #101776 - weihanglo:update-cargo, r=ehuss
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)
2022-09-13 23:58:46 +00:00
Michael Howell
11a52dc61a rustdoc: clean up DOM by removing .dockblock-short p
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of
`document.querySelectorAll("*").length` from 1278 to 1103.
2022-09-13 16:03:11 -07:00
Eric Holk
0faafbf1d9 Update parsing test 2022-09-13 15:32:38 -07:00
Eric Holk
87bb475ae7 Update must_not_suspend/ref.rs 2022-09-13 15:16:19 -07:00
Eric Holk
5671a76119 Update partial-drop-partial-reinit.rs 2022-09-13 15:16:19 -07:00
Eric Holk
b950ae44e0 Update issue-65436-raw-ptr-not-send.rs 2022-09-13 15:16:19 -07:00
Eric Holk
911c178f03 Update issue-70935-complex-spans.rs 2022-09-13 15:16:14 -07:00
Eric Holk
cf04547b0b Address code review comments 2022-09-13 14:50:12 -07:00
Eric Holk
5114cf38b1 Update issue-68114.rs 2022-09-13 14:36:45 -07:00
Eric Holk
777db102df Update issue-64130-4-async-move.rs 2022-09-13 14:36:08 -07:00
Eric Holk
9bcc107ffe Update async-await-let-else for drop tracking 2022-09-13 14:18:24 -07:00
bors
17cbdfd071 Auto merge of #101777 - matthiaskrgr:rollup-x2dyaa2, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #101266 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final)
 - #101737 (rustdoc: remove no-op CSS `.search-results .result-name > span`)
 - #101752 (Improve Attribute doc methods)
 - #101754 (Fix doc of log function)
 - #101759 (⬆️ rust-analyzer)
 - #101765 (Add documentation for TyCtxt::visibility)
 - #101770 (Rustdoc-Json: Don't loose subitems of foreign traits.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-13 21:05:21 +00:00
Matthias Krüger
f04eee1157
Rollup merge of #101770 - aDotInTheVoid:rdj-index-clone, r=GuillaumeGomez
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`
2022-09-13 22:25:39 +02:00
Matthias Krüger
68dc6396a5
Rollup merge of #101765 - GuillaumeGomez:tyctxt-visibility-doc, r=jyn514
Add documentation for TyCtxt::visibility

We encountered this issue while working on https://github.com/rust-lang/rust/pull/98450.

cc ``@lqd``
r? ``@cjgillot``
2022-09-13 22:25:38 +02:00
Matthias Krüger
2f6874d2d0
Rollup merge of #101759 - lnicola:rust-analyzer-2022-09-13, r=lnicola
⬆️ rust-analyzer

r? `@ghost`
2022-09-13 22:25:37 +02:00
Matthias Krüger
e44073b5db
Rollup merge of #101754 - NaokiM03:rename-log-to-ilog, r=Dylan-DPC
Fix doc of log function

Hi.

I found a forgotten documentation correction in the following pull request.
https://github.com/rust-lang/rust/pull/100332

See also:
https://github.com/rust-lang/rust/issues/70887
2022-09-13 22:25:36 +02:00
Matthias Krüger
8fa8021451
Rollup merge of #101752 - GuillaumeGomez:improve-attr-docs, r=lqd
Improve Attribute doc methods

r? `@lqd`
2022-09-13 22:25:35 +02:00
Matthias Krüger
f80b38b568
Rollup merge of #101737 - notriddle:notriddle/search-results-result-name-span, 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.
2022-09-13 22:25:34 +02:00
Matthias Krüger
bc8ec5e5fa
Rollup merge of #101266 - LuisCardosoOliveira:translation-rustcsession-pt3, r=davidtwco
translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final

# Description
This is the final part of the rustc_session https://github.com/rust-lang/rust/issues/100717#issuecomment-1220279883.

Please only review this [commit](a545347037). The other ones are from the PR https://github.com/rust-lang/rust/pull/101041# that is not yet merged.

In this PR, we migrate the file `output.rs`
2022-09-13 22:25:34 +02:00
Weihang Lo
3dfdfdf38b
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 &lt;path&gt;` (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)
2022-09-13 21:20:26 +01:00
Michael Howell
c950d82e90 rustdoc: remove outdated CSS .content table etc
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.
2022-09-13 12:25:32 -07:00
Your Name
d56e02e99a Added platform docs 2022-09-13 20:08:07 +01:00
bors
c84083b08e Auto merge of #101086 - cjgillot:thir-param, r=oli-obk
Compute information about function parameters on THIR

This avoids some manipulation of typeck results while building MIR.
2022-09-13 18:15:06 +00:00
Nixon Enraght-Moony
e80ccd3d3a Rustdoc-Json: Don't loose subitems of foreign traits. 2022-09-13 18:34:15 +01:00
Michael Howell
e3debdf63c rustdoc: remove redundant CSS .out-of-band > span.since { position }
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."
2022-09-13 10:26:22 -07:00
Camille GILLOT
ce9daa2f91 Rebase fallout. 2022-09-13 19:18:24 +02:00
Camille GILLOT
52f2350c63 Bless coverage report. 2022-09-13 19:18:24 +02:00
Camille GILLOT
c296a489d4 Bless codegen. 2022-09-13 19:18:24 +02:00
Camille GILLOT
494af379c4 Use def_span for external requirements. 2022-09-13 19:18:24 +02:00
Camille GILLOT
7712825cc0 Bless codegen test. 2022-09-13 19:18:24 +02:00
Camille GILLOT
f3a37ed574 Shrink some visibilities. 2022-09-13 19:18:24 +02:00
Camille GILLOT
af128b0144 Also compute implicit params in THIR. 2022-09-13 19:18:24 +02:00
Camille GILLOT
445841cda3 Compute explicit MIR params on THIR. 2022-09-13 19:18:23 +02:00
Camille GILLOT
f76594a0bc Simplify MIR building entry. 2022-09-13 19:18:23 +02:00
Camille GILLOT
1f370d9437 Use tcx.hir() utils for spans in MIR building.
This corrects the `span_with_body` in the case of closures, which was
incorrectly shortened to the `def_span`.
2022-09-13 19:18:23 +02:00
Camille GILLOT
ffe20d61d6 Only keep one version of ImplicitSelfKind. 2022-09-13 19:18:23 +02:00
bors
1ce51982b8 Auto merge of #101615 - compiler-errors:rpitit-perf, r=oli-obk
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).
2022-09-13 15:33:06 +00:00
Guillaume Gomez
de184a63a6 Add documentation for TyCtxt::visibility 2022-09-13 17:27:56 +02:00
yukang
32f8eb2fee fix #101691: copy stage0 binaries into stage0-sysroot 2022-09-13 22:53:08 +08:00
Laurențiu Nicola
c93b07019d ⬆️ rust-analyzer 2022-09-13 15:38:11 +03:00
bors
5338f5f1d4 Auto merge of #101757 - Dylan-DPC:rollup-wkt6oe9, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #101602 (Streamline `AttrAnnotatedTokenStream`)
 - #101690 (Avoid `Iterator::last`)
 - #101700 (A `SubstitutionPart` is not considered a deletion if it replaces nothing with nothing)
 - #101745 (Fix typo in concat_bytes documentation)
 - #101748 (rustdoc: remove redundant CSS `#source-sidebar, #sidebar-toggle`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-13 12:35:55 +00:00
Dylan DPC
1c74d5041f
Rollup merge of #101748 - notriddle:notriddle/source-sidebar-sidebar-toggle, r=GuillaumeGomez
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`.
2022-09-13 16:51:32 +05:30
Dylan DPC
95c9a7e7c8
Rollup merge of #101745 - jay3332:patch-1, r=JohnTitor
Fix typo in concat_bytes documentation

This fixes the typo `&[u8, _]` -> `&[u8; _]`
2022-09-13 16:51:32 +05:30
Dylan DPC
adcd1fbf2e
Rollup merge of #101700 - compiler-errors:deletion-span, r=davidtwco
A `SubstitutionPart` is not considered a deletion if it replaces nothing with nothing

Fixes #101689
2022-09-13 16:51:31 +05:30
Dylan DPC
d5b86d5ee9
Rollup merge of #101690 - kadiwa4:avoid_iterator_last, r=oli-obk
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.
2022-09-13 16:51:31 +05:30
Dylan DPC
db75d7e14b
Rollup merge of #101602 - nnethercote:AttrTokenStream, r=petrochenkov
Streamline `AttrAnnotatedTokenStream`

r? ```@petrochenkov```
2022-09-13 16:51:31 +05:30
NaokiM03
a4f8d3e36d Fix doc of log function 2022-09-13 19:21:40 +09:00