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 14 pull requests #89529

Closed
wants to merge 32 commits into from

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

devnexen and others added 30 commits July 28, 2021 13:19
On this platform, when doing stack allocation, MAP_STACK is needed
 otherwise the mapping fails.
Create VecDeque directly from the array instead of inserting items one-by-one.
Changes doc text to refer to the "default" parameter as the "default"
function.
Co-authored-by: Ivan Tham <pickfire@riseup.net>
Enable outline-atomics by default as enabled in clang by the following commit
https://reviews.llvm.org/rGc5e7e649d537067dec7111f3de1430d0fc8a4d11

Performance improves by several orders of magnitude when using the LSE instructions
instead of the ARMv8.0 compatible load/store exclusive instructions.

Tested on Graviton2 aarch64-linux with
x.py build && x.py install && x.py test
This change makes it consistent with `Hash` for all other collections.
A subset of places referred to 'super-trait', so this changes them
to all use 'supertrait'. This matches 'supertype' and some other
usages. An exception is 'auto-trait' which is consistently used
in that manner.
…kingjubilee

[aarch64] add target feature outline-atomics

Enable outline-atomics by default as enabled in clang by the following commit
https://reviews.llvm.org/rGc5e7e649d537067dec7111f3de1430d0fc8a4d11

Performance improves by several orders of magnitude when using the LSE instructions
instead of the ARMv8.0 compatible load/store exclusive instructions.

Tested on Graviton2 aarch64-linux with
x.py build && x.py install && x.py test
…shtriplett

implement advance_(back_)_by on more iterators

Add more efficient, non-default implementations for `feature(iter_advance_by)` (rust-lang#77404) on more iterators and adapters.

This PR only contains implementations where skipping over items doesn't elide any observable side-effects such as user-provided closures or `clone()` functions. I'll put those in a separate PR.
stack overflow handler specific openbsd change.
Fix an ICE caused by type mismatch errors being ignored

This PR fixes rust-lang#87771. It turns out that the check on `compiler/rustc_typeck/src/check/demand.rs:148` leads to the ICE. I removed it because the early return in [`check_expr_assign`](https://github.com/theo-lw/rust/blob/dec7fc3ced5bc3c18d0e5d29921d087f93189cb8/compiler/rustc_typeck/src/check/expr.rs#L928) already prevents unnecessary error messages from the call to `check_expr_coercable_to_type`.
…u-se

VecDeque: improve performance for From<[T; N]>

Create `VecDeque` directly from the array instead of inserting items one-by-one.

Benchmark
```
./x.py bench library/alloc --test-args vec_deque::bench_from_array_1000
```

* Before
```
test vec_deque::bench_from_array_1000                    ... bench:       3,991 ns/iter (+/- 717)
```

* After
```
test vec_deque::bench_from_array_1000                    ... bench:         268 ns/iter (+/- 37)
```
…x, r=dtolnay

Improve wording of `map_or_else` docs

Changes doc text to refer to the "default" parameter as the "default"
function.

Previously, the doc text referred to the "f" parameter as the "default" function; and the "default" parameter as the "fallback" function.
…avidtwco

Recommend running `cargo clean` in E0514 output

This suggestion has worked for me before. Seems to me it could help others.
Include the length in BTree hashes

This change makes it consistent with `Hash` for all other collections.
…=jyn514

rustdoc: use slice::contains instead of open-coding it
Improve error message for missing angle brackets in `[_]::method`

Fixes rust-lang#89388.
…t-usage, r=nagisa

Consistently use 'supertrait'.

A subset of places referred to 'super-trait', so this changes them
to all use 'supertrait'. This matches 'supertype' and some other
usages. An exception is 'auto-trait' which is consistently used
in that manner.
…estebank

Practice diagnostic message convention

Detected by rust-lang#89455.

r? ``@estebank``
…nkov

Fix ICE with buffered lint referring to AST node deleted by everybody_loops

Fixes rust-lang#87308. Note the following comment:
https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_lint/src/early.rs#L415-L417

As it turns out, this is not _always_ a bug, because `-Zunpretty=everybody_loops` causes a lot of AST nodes to be deleted, and thus some buffered lints will refer to non-existent node ids. To fix this, my changes simply ignore buffered lints if `-Zunpretty=everybody_loops` is enabled, which, from my understanding, shouldn't be a big issue because it only affects pretty-printing. Of course, a more elegant solution would only ignore buffered lints that actually point at deleted node ids, but I haven't figured out an easy way of achieving this.

For the concrete example in rust-lang#87308, the buffered lint is created [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_expand/src/mbe/macro_rules.rs#L145-L151) with the `lint_node_id` from [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_expand/src/mbe/macro_rules.rs#L319), i.e. it points at the macro _expansion_, which then gets deleted by `ReplaceBodyWithLoop` [here](https://github.com/rust-lang/rust/blob/08759c691e2e9799a3c6780ffdf910240ebd4a6b/compiler/rustc_interface/src/passes.rs#L377).
…shtriplett

Stabilize `const_panic`

Closes rust-lang#51999

FCP completed in rust-lang#89006

``@rustbot`` label +A-const-eval +A-const-fn +T-lang

cc ``@oli-obk`` for review (not `r?`'ing as not on lang team)
@rustbot rustbot added the rollup A PR which is a rollup label Oct 4, 2021
@Manishearth
Copy link
Member Author

@bors r+ p=5

@bors
Copy link
Contributor

bors commented Oct 4, 2021

📌 Commit 4984e50 has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Oct 4, 2021

🌲 The tree is currently closed for pull requests below priority 4. This pull request will be tested once the tree is reopened.

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

bors commented Oct 4, 2021

⌛ Testing commit 4984e50 with merge 6ce9b4ef6e5289467b02c3e9e686e6fb6a41738d...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] addr2line test:false 0.596
[RUSTC-TIMING] core test:false 27.851
[RUSTC-TIMING] gimli test:false 6.055
[RUSTC-TIMING] object test:false 6.197
error[E0425]: cannot find value `MAP_STACK` in crate `libc`
   --> library/std/src/sys/unix/stack_overflow.rs:150:52
    |
150 |         let flags = MAP_PRIVATE | MAP_ANON | libc::MAP_STACK;
    |                                                    ^^^^^^^^^ not found in `libc`
For more information about this error, try `rustc --explain E0425`.
[RUSTC-TIMING] std test:false 2.972
error: could not compile `std` due to previous error
Build completed unsuccessfully in 0:06:57

@bors
Copy link
Contributor

bors commented Oct 4, 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 Oct 4, 2021
@workingjubilee
Copy link
Contributor

Carried 13 of 14 into #89530
@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-review Status: Awaiting review from the assignee but also interested parties. labels Oct 4, 2021
@Manishearth
Copy link
Member Author

Thanks Jubilee!

@Manishearth Manishearth closed this Oct 4, 2021
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.

None yet