Commit Graph

200339 Commits

Author SHA1 Message Date
bors
a0d1df4a5d Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillot
Simplify visitors more

A successor to #100392.

r? `@cjgillot`
2022-09-14 05:21:14 +00:00
bors
a5b58addae Auto merge of #101307 - jyn514:simplify-storage, r=cjgillot
Simplify caching and storage for queries

I highly recommend reviewing commit-by-commit; each individual commit is quite small but it can be hard to see looking at the overall diff that the behavior is the same. Each commit depends on the previous.

r? `@cjgillot`
2022-09-14 02:39:51 +00:00
est31
3a38d566bd Also replace the placeholder for the stable_features lint 2022-09-14 03:28:54 +02:00
SparrowLii
bfc4f2e189 add debug assertion for max attr_id 2022-09-14 08:49:12 +08:00
SparrowLii
1a3ecbdb6a make mk_attr_id part of ParseSess 2022-09-14 08:49:10 +08:00
Jack Huey
aae37f8763 Use Predicate ConstraintCategory when normalizing 2022-09-13 20:18:49 -04:00
Jack Huey
c75817b0a7 Better errors for implied static bound 2022-09-13 20:18:04 -04:00
Markus Reiter
db29de7745
Simplify const memchr. 2022-09-14 02:00:18 +02: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
Jhonny Bill Mena
c846ba6e53 UPDATE - merge and avoid translations for symbol mangling test output 2022-09-13 16:19:32 -04:00
b-naber
ba00189d8e rebase 2022-09-13 21:51:35 +02: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
Daniel Paoliello
c407cc554e Add cargo.extraEnv setting 2022-09-13 11:29:14 -07: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
Camille GILLOT
cb5ea8d0b6 Emit an error instead of reconstructing token stream. 2022-09-13 19:47:50 +02:00
Camille GILLOT
8823634db8 Manually cleanup token stream when macro expansion aborts. 2022-09-13 19:46:01 +02: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