Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 12 pull requests #83039

Closed
wants to merge 29 commits into from
Closed

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

camelid and others added 29 commits December 26, 2020 10:09
Now https://msys2.github.io/ redirects to https://www.msys2.org/, so
the README might just link to that immediately.
This essentially switches search-index.js from a "array of struct"
to a "struct of array" format, like this:

    {
    "doc": "Crate documentation",
    "t": [ 1, 1, 2, 3, ... ],
    "n": [ "Something", "SomethingElse", "whatever", "do_stuff", ... ],
    "q": [ "a::b", "", "", "", ... ],
    "d": [ "A Struct That Does Something", "Another Struct", "a function", "another function", ... ],
    "i": [ 0, 0, 1, 1, ... ],
    "f": [ null, null, [], [], ... ],
    "p": ...,
    "a": ...
    }

So `{ty: 1, name: "Something", path: "a::b", desc: "A Struct That Does Something", parent_idx: 0, search_type: null}` is the first item.

This makes the uncompressed version smaller, but it really shows on the
compressed version:

    notriddle:rust$ wc -c new-search-index1.52.0.js
    2622427 new-search-index1.52.0.js
    notriddle:rust$ wc -c old-search-index1.52.0.js
    2725046 old-search-index1.52.0.js
    notriddle:rust$ gzip new-search-index1.52.0.js
    notriddle:rust$ gzip old-search-index1.52.0.js
    notriddle:rust$ wc -c new-search-index1.52.0.js.gz
    239385 new-search-index1.52.0.js.gz
    notriddle:rust$ wc -c old-search-index1.52.0.js.gz
    296328 old-search-index1.52.0.js.gz
    notriddle:rust$

That's a 4% improvement on the uncompressed version (fewer `[]`),
and 20% improvement after gzipping it, thanks to putting like-typed
data next to each other. Any compression algorithm based on a sliding
window will probably show this kind of improvement.
…r=Mark-Simulacrum

Clarify what `Cell::replace` returns
…ftSpider

Rustdoc Json: Add tests for Reexports, and improve jsondocck

The two changes are orthognal, so you can land just one if you want, but the improved errors realy helped write the tests.

Notably does not have the case from rust-lang#80664, but I want to have all the ajacent cases tested before starting work on that to ensure I dont break anything.

Improves rust-lang#81359

cc ``@CraftSpider``

r? ``@jyn514``

``@rustbot`` modify labels: +A-testsuite +T-rustdoc +A-rustdoc-json
…astorino

Add `-Z unpretty` flag for the THIR

This adds a new perma-unstable flag, `-Zunpretty=thir-tree`, that dumps the raw THIR tree for each body in the crate.

Implements the THIR part of MCP rust-lang/compiler-team#408, helps with rust-lang/rustc-dev-guide#1062.
Depends on rust-lang#82495, blocked on that. Only the two last commits are added by this PR.
r? ``@spastorino`` cc ``@estebank``
…n514

convert slice doc link to intra-doc links

Continuing where rust-lang#80189 stopped, with `core::slice`.

I had an issue with two dead links in my doc when implementing `Deref<Target = [T]>` for one of my type. This means that [`binary_search_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.binary_search_by_key) was available, but not [`sort_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key) even though it was linked in it's doc (same issue with [`as_ptr`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_ptr) and [`as_mut_pbr`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.as_mut_ptr)). It becomes available if I implement `DerefMut`, as it needs an `&mut self`.

<details>
  <summary>Code that will have dead links in its doc</summary>

```rust
pub struct A;
pub struct B;

impl std::ops::Deref for B{
    type Target = [A];

    fn deref(&self) -> &Self::Target {
        &A
    }
}
```
</details>

I removed the link to `sort_by_key` from `binary_search_by_key` doc as I didn't find a nice way to have a live link:
- `binary_search_by_key` is in `core`
- `sort_by_key` is in `alloc`
- intra-doc link `slice::sort_by_key` doesn't work, as `alloc` is not available when `core` is being build (the warning can't be ignored: ```error[E0710]: an unknown tool name found in scoped lint: `rustdoc::broken_intra_doc_links` ```)
- keeping the link as an anchor `#method.sort_by_key` meant a dead link
- an absolute link would work but doesn't feel right...
Add spirv extension handling in compiletest

We're trying to use `compiletest` for Rust-GPU's testsuite, and ran into an issue with host specific extensions. This adds handling to fix that.
update MSYS2 link in README

Now https://msys2.github.io/ redirects to https://www.msys2.org/, so the README might just link to that immediately.
…mo157

Fix "run" button position in error index

This isn't really a rustdoc issue but I still made the same fix in the `rustdoc.css` file (doesn't hurt).

Before:

![Screenshot from 2021-03-10 16-35-49](https://user-images.githubusercontent.com/3050060/110655807-aa402800-81bf-11eb-8a88-bc979efd1697.png)

After:

![Screenshot from 2021-03-10 16-40-08](https://user-images.githubusercontent.com/3050060/110655843-b4622680-81bf-11eb-8670-42975d92b4eb.png)

cc ```@jyn514``` (considering this is quite a big bug and an easy fix)
r? ```@Nemo157```
…Simulacrum

Ignore Vim swap files

I got this from [a Stack Overflow answer][so].
(I didn't add `*~` because it was already there.)

[so]: https://stackoverflow.com/a/4824199
…aumeGomez

rustdoc: tweak the search index format

This essentially switches search-index.js from a "array of struct" to a "struct of array" format, like this:

    {
    "doc": "Crate documentation",
    "t": [ 1, 1, 2, 3, ... ],
    "n": [ "Something", "SomethingElse", "whatever", "do_stuff", ... ],
    "q": [ "a::b", "", "", "", ... ],
    "d": [ "A Struct That Does Something", "Another Struct", "a function", "another function", ... ],
    "i": [ 0, 0, 1, 1, ... ],
    "f": [ null, null, [], [], ... ],
    "p": ...,
    "a": ...
    }

So `{ty: 1, name: "Something", path: "a::b", desc: "A Struct That Does Something", parent_idx: 0, search_type: null}` is the first item.

This makes the uncompressed version smaller, but it really shows on the compressed version:

    notriddle:rust$ wc -c new-search-index1.52.0.js
    2622427 new-search-index1.52.0.js
    notriddle:rust$ wc -c old-search-index1.52.0.js
    2725046 old-search-index1.52.0.js
    notriddle:rust$ gzip new-search-index1.52.0.js
    notriddle:rust$ gzip old-search-index1.52.0.js
    notriddle:rust$ wc -c new-search-index1.52.0.js.gz
    239385 new-search-index1.52.0.js.gz
    notriddle:rust$ wc -c old-search-index1.52.0.js.gz
    296328 old-search-index1.52.0.js.gz

That's a 4% improvement on the uncompressed version (fewer `[]`, and also changing `null` to `0` in the parent_idx list), and 20% improvement after gzipping it, thanks to putting like-typed data next to each other. Any compression algorithm based on a sliding window will probably show this kind of improvement.
Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account

This makes compilation to such targets (e.g. `wasm32-wasi`) easier.

cc rust-lang/miri#722 rust-lang@bb6d1d0#r48100619
Reintroduce accidentally deleted assertions.

These were removed in rust-lang#50198
@rustbot rustbot added the rollup A PR which is a rollup label Mar 11, 2021
@JohnTitor
Copy link
Member Author

@bors r+ p=12 rollup=never

@bors
Copy link
Contributor

bors commented Mar 11, 2021

📌 Commit 9ad4625 has been approved by JohnTitor

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 11, 2021
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  SCCACHE_BUCKET: rust-lang-ci-sccache2
  TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
  CACHE_DOMAIN: ci-caches.rust-lang.org
  EXTRA_VARIABLES: {
 "CI_ONLY_WHEN_SUBMODULES_CHANGED": 1
##[endgroup]
adding extra environment variable CI_ONLY_WHEN_SUBMODULES_CHANGED
linux builder detected, using docker to run the build
##[group]Run src/ci/scripts/should-skip-this.sh
---

failures:

---- client_invalid_toml_manifest stdout ----
Sending: Object({"id": Number(0), "jsonrpc": String("2.0"), "method": String("initialize"), "params": Object({"capabilities": Object({"window": Object({"progress": Bool(true)})}), "processId": Null, "rootPath": String("/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t27/invalid_toml"), "rootUri": Null})})
Processing message: Object({"id": Number(0), "jsonrpc": String("2.0"), "result": Object({"capabilities": Object({"codeActionProvider": Bool(true), "codeLensProvider": Object({"resolveProvider": Bool(false)}), "completionProvider": Object({"resolveProvider": Bool(true), "triggerCharacters": Array([String("."), String(":")])}), "definitionProvider": Bool(true), "documentFormattingProvider": Bool(true), "documentHighlightProvider": Bool(true), "documentRangeFormattingProvider": Bool(false), "documentSymbolProvider": Bool(true), "executeCommandProvider": Object({"commands": Array([String("rls.applySuggestion-1279"), String("rls.deglobImports-1279")])}), "hoverProvider": Bool(true), "implementationProvider": Bool(true), "referencesProvider": Bool(true), "renameProvider": Bool(true), "textDocumentSync": Number(2), "workspaceSymbolProvider": Bool(true)})})})
Processing message: Object({"jsonrpc": String("2.0"), "method": String("window/progress"), "params": Object({"done": Null, "id": String("progress_1"), "message": Null, "percentage": Null, "title": String("Building")})})
Processing message: Object({"jsonrpc": String("2.0"), "method": String("window/progress"), "params": Object({"done": Bool(true), "id": String("progress_1"), "message": Null, "percentage": Null, "title": String("Building")})})
Processing message: Object({"jsonrpc": String("2.0"), "method": String("window/progress"), "params": Object({"done": Null, "id": String("progress_0"), "message": Null, "percentage": Null, "title": String("Indexing")})})
Processing message: Object({"jsonrpc": String("2.0"), "method": String("textDocument/publishDiagnostics"), "params": Object({"diagnostics": Array([Object({"message": String("failed to parse manifest at `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t27/invalid_toml/Cargo.toml`"), "range": Object({"end": Object({"character": Number(22), "line": Number(2)}), "start": Object({"character": Number(21), "line": Number(2)})}), "severity": Number(1)})]), "uri": String("file:///checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/rlsit/t27/invalid_toml/Cargo.toml")})})
Processing message: Object({"jsonrpc": String("2.0"), "method": String("window/progress"), "params": Object({"done": Bool(true), "id": String("progress_0"), "message": Null, "percentage": Null, "title": String("Indexing")})})
thread 'client_invalid_toml_manifest' panicked at 'called `Result::unwrap()` on an `Err` value: Elapsed(())', src/tools/rls/tests/support/client/mod.rs:265:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Sending: Object({"id": Number(99999), "jsonrpc": String("2.0"), "method": String("shutdown"), "params": Null})
Processing message: Object({"id": Number(99999), "jsonrpc": String("2.0"), "result": Null})
Sending: Object({"jsonrpc": String("2.0"), "method": String("exit"), "params": Null})
error: test failed, to rerun pass '--test client'

failures:
    client_invalid_toml_manifest

---
Verifying status of edition-guide...
Verifying status of rls...
This PR updated 'src/tools/rls', verifying if status is 'test-pass'...

We detected that this PR updated 'rls', but its tests failed.

If you do intend to update 'rls', please check the error messages above and
commit another update.

If you do NOT intend to update 'rls', please ensure you did not accidentally
change the submodule at 'src/tools/rls'. You may ask your reviewer for the
proper steps.
{"nomicon":"test-pass","rls":"test-fail","edition-guide":"test-pass","cargo-miri":"test-fail","rustfmt":"test-pass","rustbook":"test-fail","book":"test-pass","reference":"test-pass","embedded-book":"test-pass","rust-by-example":"test-pass","miri":"test-pass"}failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 check-tools

@JohnTitor
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 11, 2021
@JohnTitor JohnTitor closed this Mar 11, 2021
@JohnTitor JohnTitor deleted the rollup-x60hl30 branch March 11, 2021 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.