-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 8 pull requests #82928
Closed
Closed
Rollup of 8 pull requests #82928
Conversation
This file contains 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
Because child > 0, the two statements are equivalent, but using saturating_sub and <= yields in faster code. This is most notable in the binary_heap::bench_into_sorted_vec benchmark, which shows a speedup of 1.26x, which uses sift_down_range internally. The speedup of pop (that uses sift_down_to_bottom internally) is much less significant as the sifting method is not called in a loop.
I'm still not totally sure if this is the right way to implement the memcpy, but that portion compiles correctly now. Now to fix the compile errors everywhere else :).
This updates all places where match branches check on StatementKind or UseContext. This doesn't properly implement them, but adds TODOs where they are, and also adds some best guesses to what they should be in some cases.
Changed to various implementations, copying the style of prior function calls in places I was unsure of. Also one minor style nit.
Fixes copy_non_overlapping codegen_ssa to properly handle pointees, and use bytes instead of elem count
This replaces where it was previously being constructed in intrinsics, with direct construction of the Statement.
It was suggested to lower this in MIR instead of ssa, so do that instead.
Also add some span_bugs where it is unreachable
Rust contains various size checks conditional on target_arch = "x86_64", but these checks were never intended to apply to x86_64-unknown-linux-gnux32. Add target_pointer_width = "64" to the conditions.
Fixes rust-lang#77215 As mentioned in rust-lang#77215, the current CONTRIBUTING.md links to the rustc-dev-guide. Even though the rustc-dev-guide has lots of useful information for contributors, one is already confused by reading the first line of the current CONTRIBUTING.md. > To get started, read the [Getting Started] guide in the [rustc-dev-guide]. This line tells the contributor to go and read the rustc-dev-guide. What is the rustc-dev-guide? What does rustc even mean? These are some of the questions that went into my head when reading this line as a first time contributor. By explaining what the rustc-dev-guide is and some platforms to get help, a new contributor understands what the first step is and the process is much clearer. The `About the [rustc-dev-guide]` section explains what the rustc-dev-guide is, what rustc is, and the purpose out of reading the guide. The `Getting help` section points the user to some places where they can get help, find a mentor, and introduce themsevles.
Co-authored-by: Camelid <camelidcamel@gmail.com>
Add StatementKind::CopyNonOverlapping Implements rust-lang/compiler-team#348 r? `@nagisa`
…rf, r=dtolnay Improve sift_down performance in BinaryHeap Replacing `child < end - 1` with `child <= end.saturating_sub(2)` in `BinaryHeap::sift_down_range` (surprisingly) results in a significant speedup of `BinaryHeap::into_sorted_vec`. The same substitution can be done for `BinaryHeap::sift_down_to_bottom`, which causes a slight but probably statistically insignificant speedup for `BinaryHeap::pop`. It's interesting that benchmarks aside from `bench_into_sorted_vec` are barely affected, even those that do use `sift_down_*` methods internally. | Benchmark | Before (ns/iter) | After (ns/iter) | Speedup | |--------------------------|------------------|-----------------|---------| | bench_find_smallest_1000<sup>1</sup> | 392,617 | 385,200 | 1.02 | | bench_from_vec<sup>1</sup> | 506,016 | 504,444 | 1.00 | | bench_into_sorted_vec<sup>1</sup> | 476,869 | 384,458 | 1.24 | | bench_peek_mut_deref_mut<sup>3</sup> | 518,753 | 519,792 | 1.00 | | bench_pop<sup>2</sup> | 446,718 | 444,409 | 1.01 | | bench_push<sup>3</sup> | 772,481 | 770,208 | 1.00 | <sup>1</sup>: internally calls `sift_down_range` <sup>2</sup>: internally calls `sift_down_to_bottom` <sup>3</sup>: should not be affected
…t, r=m-ou-se Added #[repr(transparent)] to core::cmp::Reverse I found casting from an `&T` to an `&Reverse<T>` potentially useful, but found that `Reverse` was not `#[repr(transparent)]`, so after asking about it [on Reddit](https://www.reddit.com/r/rust/comments/le60uv/make_stdcmpreverse_reprtransparent_and_add_a/), I decided to go ahead and make a pull request which simply adds the attribute to the struct.
…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`
…-Simulacrum Bump libc dependency of std to 0.2.88. This PR bumps the `libc` dependency of `std` to 0.2.88. This will fix `TcpListener::accept` for Android on x86 platforms (rust-lang/libc@31a2777). This will really finally fix rust-lang#82400 for the main branch :) r? `@JohnTitor`
Add regression test for rust-lang#75525
Change x64 size checks to not apply to x32. Rust contains various size checks conditional on target_arch = "x86_64", but these checks were never intended to apply to x86_64-unknown-linux-gnux32. Add target_pointer_width = "64" to the conditions.
…g-md, r=joshtriplett Update CONTRIBUTING.md Fixes rust-lang#77215 As mentioned in rust-lang#77215, the current CONTRIBUTING.md links to the rustc-dev-guide. Even though the rustc-dev-guide has lots of useful information for contributors, one is already confused by reading the first line of the current CONTRIBUTING.md. > To get started, read the [Getting Started] guide in the [rustc-dev-guide]. This line tells the contributor to go and read the rustc-dev-guide. What is the rustc-dev-guide? What does rustc even mean? These are some of the questions that went into my head when reading this line as a first-time contributor. By explaining what the rustc-dev-guide is and some platforms to get help, a new contributor understands what the first step is and the process is much clearer. The `About the [rustc-dev-guide]` section explains what the rustc-dev-guide is, what rustc is, and the purpose out of reading the guide. The `Getting help` section points the user to some places where they can get help, find a mentor, and introduce themselves.
@bors r+ p=8 rollup=never |
📌 Commit 07d5de3 has been approved by |
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 9, 2021
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors r- |
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 9, 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
let
bindings #82048 (or-patterns: disallow inlet
bindings)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup