Rollup of 14 pull requests by Manishearth · Pull Request #89525 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation7 Commits35 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Manishearth

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

@theo-lw

@xu-cheng

@xu-cheng

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

@sunfishcode

As suggested in rust-lang#88564. This adds a try_clone() to OwnedFd by refactoring the code out of the existing File/Socket code.

@sunfishcode

@sunfishcode

@sunfishcode

@theo-lw

@Nitepone

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

@pierwill

@the8472

@the8472 @pickfire

Co-authored-by: Ivan Tham pickfire@riseup.net

@the8472

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

@cuviper

This change makes it consistent with Hash for all other collections.

@FabianWolff

@notriddle

@waywardmonkeys

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.

@hkmatsumoto

@FabianWolff

@jhpratt

@Manishearth

…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

@Manishearth

…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.

@Manishearth

@Manishearth

…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
test vec_deque::bench_from_array_1000                    ... bench:       3,991 ns/iter (+/- 717)
test vec_deque::bench_from_array_1000                    ... bench:         268 ns/iter (+/- 37)

@Manishearth

…r=joshtriplett

Add a try_clone() function to OwnedFd.

As suggested in rust-lang#88564. This adds a try_clone() to OwnedFd by refactoring the code out of the existing File/Socket code.

r? @joshtriplett

@Manishearth

…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.

@Manishearth

…avidtwco

Recommend running cargo clean in E0514 output

This suggestion has worked for me before. Seems to me it could help others.

@Manishearth

Include the length in BTree hashes

This change makes it consistent with Hash for all other collections.

@Manishearth

…=jyn514

rustdoc: use slice::contains instead of open-coding it

@Manishearth

Improve error message for missing angle brackets in [_]::method

Fixes rust-lang#89388.

@Manishearth

…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.

@Manishearth

…estebank

Practice diagnostic message convention

Detected by rust-lang#89455.

r? @estebank

@Manishearth

…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 with the lint_node_id from here, i.e. it points at the macro expansion, which then gets deleted by ReplaceBodyWithLoop here.

@Manishearth

…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)

@Manishearth

@bors

📌 Commit 2914d1d has been approved by Manishearth

@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

⌛ Testing commit 2914d1d with merge fc711bbcfe303b6a138e6b999ae79a9a4c704d52...

@Manishearth

@bors treeclosed=4

The queue's really big, going to try and get some rollups in. Feel free to give some of the rollup=never PRs higher priority if necessary, or reopen the tree if I end up not being super responsive (you can ping me on Zulip or Discord).

@rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)


error[E0432]: unresolved import `crate::sys::cvt`
  --> library/std/src/os/fd/owned.rs:11:5
   |
11 | use crate::sys::cvt;
   |     ^^^^^^^^^^^^^^^ no `cvt` in `sys`

error[E0425]: cannot find value `F_DUPFD_CLOEXEC` in crate `libc`
    |
    |
79  |         let cmd = libc::F_DUPFD_CLOEXEC;
    |                         ^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `FD_CLOEXEC`
   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.99/src/wasi.rs:188:1
    |
    |
188 | pub const FD_CLOEXEC: c_int = 1;
    | -------------------------------- similarly named constant `FD_CLOEXEC` defined here
Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
[RUSTC-TIMING] std test:false 2.389
warning: `std` (lib) generated 1 warning

@bors

@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

@nbdd0121

@bors bors mentioned this pull request

Oct 4, 2021

This was referenced

Oct 4, 2021