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 11 pull requests #82840

Closed
wants to merge 87 commits into from
Closed

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Mar 6, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgnottingham and others added 30 commits January 29, 2021 12:46
Previously, only the end of pass RSS was indicated. This could easily
lead one to believe that the change in RSS from one pass to the next was
attributable to the second pass, when in fact it occurred between the
end of the first pass and the start of the second.

Also, improve alignment of columns.
…jorn3

Sync rustc_codegen_cranelift

The highlight of this sync are abi compatibility with cg_llvm allowing mixing of cg_clif and cg_llvm compiled crates and switching to the x64 cranelift backend based on the new backend framework.

r? ``@ghost``

``@rustbot`` label +A-codegen +A-cranelift +T-compiler
This commit adds a new ABI to be selected via `extern
"C-cmse-nonsecure-call"` on function pointers in order for the compiler to
apply the corresponding cmse_nonsecure_call callsite attribute.
For Armv8-M targets supporting TrustZone-M, this will perform a
non-secure function call by saving, clearing and calling a non-secure
function pointer using the BLXNS instruction.

See the page on the unstable book for details.

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This reverts commit bfcf97b.

It causes a "can't resolve symbol" crash on macOS
FreeBSD doesn't have /bin/bash
bjorn3 and others added 17 commits March 5, 2021 19:12
This allows sharing those files between different doc invocations
without having to know their names ahead of time.
we need to actually -> we actually need to

@rustbot label +C-cleanup
bypass auto_da_alloc for metadata files

This saves about 0.7% when rerunning the UI test suite. I.e. when the metadata files exist and will be overwritten. No improvements expected for a clean build. So it might show up in incr-patched perf results.
```
regular rename:

Benchmark #1: touch src/tools/compiletest/src/main.rs ; RUSTC_WRAPPER="" schedtool -B -e ./x.py test src/test/ui
  Time (mean ± σ):     47.305 s ±  0.170 s    [User: 1631.540 s, System: 412.648 s]
  Range (min … max):   47.125 s … 47.856 s    20 runs

non-durable rename:

Benchmark #1: touch src/tools/compiletest/src/main.rs ; RUSTC_WRAPPER="" schedtool -B -e ./x.py test src/test/ui
  Time (mean ± σ):     46.930 s ±  0.064 s    [User: 1634.344 s, System: 396.038 s]
  Range (min … max):   46.759 s … 47.043 s    20 runs
```

There are more places that trigger auto_da_alloc behavior by overwriting existing files with O_TRUNC, but those are much harder to locate because `O_TRUNC` is set on `open()` but the writeback is triggered on `close()`. The latter is the part which shows up in profiles.
…petrochenkov

or-patterns: disallow in `let` bindings

~~Blocked on rust-lang#81869

Disallows top-level or-patterns before type ascription. We want to reserve this syntactic space for possible future generalized type ascription.

r? `@petrochenkov`
Prevent specialized ZipImpl from calling `__iterator_get_unchecked` twice with the same index

Fixes rust-lang#82291

It's open for review, but conflicts with rust-lang#82289, wait before merging. The conflict involves only the new test, so it should be rather trivial to fix.
…laumeGomez

Remove RefCell around `module_trait_cache`

This builds on rust-lang#82018 and should not be merged before.

## Don't require a `DocContext` for `report_diagnostic`

This is needed for the next commit, which needs mutable access to the `cx` from
within the `decorate` closure.

- Change `as_local_hir_id` to an associated function, since it only
  needs a `TyCtxt`
- Change `source_span_for_markdown_range` to only take a `TyCtxt`

##  Remove RefCell around module_trait_cache

This is mostly just changing lots of functions from `&DocContext` to `&mut DocContext`.
Improve transmute docs with further clarifications

Closes rust-lang#82493.

Please let me know if any of the new wording sounds off, English is not my mother tongue.
…eGomez

Cleanup rustdoc warnings

## Clean up error reporting for deprecated passes

Using `error!` here goes all the way back to the original commit, rust-lang#8540. I don't see any reason to use logging; rustdoc should use diagnostics wherever possible. See rust-lang#81932 (comment) for further context.

- Use spans for deprecated attributes
- Use a proper diagnostic for unknown passes, instead of error logging
- Add tests for unknown passes
- Improve some wording in diagnostics

##  Report that `doc(plugins)` doesn't work using diagnostics instead of `eprintln!`

This also adds a test for the output.

This was added in rust-lang#52194. I don't see any particular reason not to use diagnostics here, I think it was just missed in rust-lang#50541.
Fix diagnostic suggests adding type `[type error]`

Fixes rust-lang#79040

### Unresolved questions:

<del>Why does this change output the diagnostic twice (`src/test/ui/79040.rs`)?</del> Thanks ```@oli-obk```
…nkov

Move some tests to more suitable subdirs

## The results from classifui

(The full results can be found here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427)

- [lint-expr-stmt-attrs-for-early-lints.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/lint-expr-stmt-attrs-for-early-lints.rs) <sup>unknown</sup>: lint (1.566), feature-gates (-0.632), numbers-arithmetic (-0.955)
- [try-block.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/try-block.rs) <sup>unknown</sup>: binding (1.385), try-block (-0.097), lint (-0.932)
- [backtrace-debuginfo.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/backtrace-debuginfo.rs) <sup>unknown</sup>: macros (1.365), cfg (-0.279), drop (-0.291)
- [issues/issue-3521.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3521.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/3521)</sup>: consts (1.298), enum (-0.872), in-band-lifetimes (-0.978)
- [impl-bounds-checking.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-bounds-checking.rs) <sup>unknown</sup>: traits (1.243), for (-0.999), shadowed (-0.999)
- [issues/issue-17718.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17718.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/17718)</sup>: binding (1.236), consts (0.315), extern (-0.779)
- [issue-6157.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-6157.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/6157)</sup>: regions (1.213), unboxed-closures (-0.285), traits (-0.510)
- [issues/issue-44373.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-44373.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/44373)</sup>: consts (1.187), nll (0.427), borrowck (-0.704)
- [nullable-pointer-ffi-compat.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/nullable-pointer-ffi-compat.rs) <sup>unknown</sup>: regions (1.184), consts (0.650), traits (-0.571)
- [issues/issue-52992.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52992.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52992)</sup>: nll (1.132), associated-types (-0.628), parser (-0.893)
- [issues/issue-2330.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2330.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2330)</sup>: traits (1.116), directory_ownership (-0.691), compare-method (-0.981)
- [issue-74047.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-74047.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/74047)</sup>: async-await (1.109), impl-trait (-0.629), resolve (-0.781)
- [issues/issue-33140.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/33140)</sup>: traits (1.063), coherence (-0.832), codemap_tests (-0.944)
- [issues/issue-28576.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-28576.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/28576)</sup>: traits (1.062), associated-types (-0.333), impl-trait (-0.697)
- [issues/issue-7222.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7222.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/7222)</sup>: binding (1.062), consts (-0.226), numbers-arithmetic (-0.294)
- [tup.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/tup.rs) <sup>unknown</sup>: structs-enums (1.061), threads-sendsync (-0.550), moves (-0.790)
- [issues/issue-15261.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-15261.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/15261)</sup>: consts (1.052), where-clauses (-0.833), macros (-0.862)
- [issues/issue-76179.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-76179.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/76179)</sup>: associated-types (1.048), process (-0.887), rfc-2457 (-0.984)
- [issues/issue-42344.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-42344.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/42344)</sup>: borrowck (1.043), macros (-0.481), specialization (-0.966)
- [issues/issue-18661.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18661.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/18661)</sup>: unboxed-closures (1.038), mir (-0.648), higher-rank-trait-bounds (-0.688)
- [issues/issue-2633.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2633.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2633)</sup>: structs-enums (1.020), functions-closures (-0.722), lint (-0.967)

Some notes:
- If there are related tests (e.g. it's for the same issue), they are moved along with it.
- Moved try-block.rs to the `try-block` dir.
- Moved tup.rs to the `tuple` dir.
- Moved some tests that classified as consts to the `statics` dir, as it seems they have statics actually.
- Skipped backtrace-debuginfo.rs because I think classifui overrates their helper macros.

cc rust-lang#73494
r? ``@petrochenkov``
…meGomez

rustdoc: Add an unstable option to print all unversioned files

This allows sharing those files between different doc invocations
without having to know their names ahead of time.

Helps with rust-lang/docs.rs#1302.
r? ```@GuillaumeGomez``` cc ```@pietroalbini``` ```@Nemo157```
…jorn3

Sync rustc_codegen_cranelift

The main highlight of this sync is removal of support for the old x86 Cranelift backend. This made it possible to use native atomic instructions rather than hackishly using a global mutex. 128bit integer support has also seen a few bugfixes and performance improvements. And finally I have formatted everything using the same rustfmt config as the rest of this repo.

r? ```@ghost```

```@rustbot``` label +A-codegen +A-cranelift +T-compiler
…li-obk

Fix typo

we need to actually -> we actually need to

```@rustbot``` label +C-cleanup
@rustbot rustbot added the rollup A PR which is a rollup label Mar 6, 2021
@m-ou-se
Copy link
Member Author

m-ou-se commented Mar 6, 2021

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Mar 6, 2021

📌 Commit a5c5762 has been approved by m-ou-se

@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 6, 2021
@bors
Copy link
Contributor

bors commented Mar 6, 2021

⌛ Testing commit a5c5762 with merge f7457034a634642e45deaf442153901fb7a99e63...

@rust-log-analyzer
Copy link
Collaborator

The job dist-mipsel-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling semver v0.11.0
   Compiling cargo_metadata v0.12.0
[RUSTC-TIMING] semver test:false 0.804
   Compiling clippy_lints v0.1.52 (/checkout/src/tools/clippy/clippy_lints)
error: top-level or-patterns are not allowed in `let` bindings
    |
    |
888 |         let Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) = &self.0;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s))`
[RUSTC-TIMING] semver_parser test:false 2.590
[RUSTC-TIMING] cargo_metadata test:false 6.616
error: aborting due to previous error

---
[RUSTC-TIMING] futures_macro test:false 1.580
   Compiling tokio v0.2.24
[RUSTC-TIMING] json test:false 3.894
   Compiling clippy_lints v0.1.52 (/checkout/src/tools/clippy/clippy_lints)
error: top-level or-patterns are not allowed in `let` bindings
    |
    |
888 |         let Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) = &self.0;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: wrap the pattern in parentheses: `(Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s))`
[RUSTC-TIMING] futures_macro test:false 1.658
[RUSTC-TIMING] rustc_workspace_hack test:false 0.031
   Compiling futures-util v0.3.12
[RUSTC-TIMING] env_logger test:false 3.230
---
Dist rust-analyzer-nightly-mipsel-unknown-linux-gnu
 finished in 10.046 seconds
[TIMING] RustAnalyzer { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-linux-gnu", file: None } }, target: TargetSelection { triple: "mipsel-unknown-linux-gnu", file: None } } -- 10.078
Dist llvm-tools-nightly-mipsel-unknown-linux-gnu
thread 'main' panicked at 'clippy expected to build - essential tool', src/bootstrap/dist.rs:1129:14
 finished in 23.973 seconds
[TIMING] LlvmTools { target: TargetSelection { triple: "mipsel-unknown-linux-gnu", file: None } } -- 24.172
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host mipsel-unknown-linux-gnu --target mipsel-unknown-linux-gnu
Build completed unsuccessfully in 0:24:12

@bors
Copy link
Contributor

bors commented Mar 6, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 6, 2021
@JohnTitor JohnTitor closed this Mar 6, 2021
@m-ou-se m-ou-se deleted the rollup-hk324no branch March 7, 2021 10:59
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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.