-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 #59632
Merged
Merged
Rollup of 8 pull requests #59632
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
We can use `usize::try_from` to convert steps from any size of integer. This enables a meaningful `size_hint()` for larger ranges, rather than always just `(0, None)`. Now they return the true `(len, Some(len))` when it fits, otherwise `(usize::MAX, None)` for overflow.
* Don't promote these borrows if we're going to remove them before codegen * Correctly mark unreachable code
async fn now lowers directly to an existential type declaration rather than reusing the `impl Trait` return type lowering. As part of this, it lowers all argument-position elided lifetimes using the in-band-lifetimes machinery, creating fresh parameter names for each of them, using each lifetime parameter as a generic argument to the generated existential type. This doesn't currently successfully allow multiple argument-position elided lifetimes since `existential type` doesn't yet support multiple lifetimes where neither outlive the other. This requires a separate fix.
…scottmcm Remove duplicated code from Iterator::{ne, lt, le, gt, ge} This PR delegates `Iterator::ne` to `Iterator::eq` and `Iterator::{lt, le, gt, ge}` to `Iterator::partial_cmp`. Oddly enough, this change actually simplifies the generated assembly [in some cases](https://rust.godbolt.org/z/riBtNe), although I don't understand assembly well enough to see if the longer assembly is doing something clever. I also added two extremely simple benchmarks: ``` // before test iter::bench_lt ... bench: 98,404 ns/iter (+/- 21,008) test iter::bench_partial_cmp ... bench: 62,437 ns/iter (+/- 5,009) // after test iter::bench_lt ... bench: 61,757 ns/iter (+/- 8,770) test iter::bench_partial_cmp ... bench: 62,151 ns/iter (+/- 13,753) ``` I have no idea why the current `lt`/`le`/`gt`/`ge` implementations don't seem to be compiled optimally, but simply having them call `partial_cmp` seems to be an improvement. See rust-lang#44729 for a previous discussion.
Refactor async fn return type lowering async fn now lowers directly to an existential type declaration rather than reusing the `impl Trait` return type lowering. As part of this, it lowers all argument-position elided lifetimes using the in-band-lifetimes machinery, creating fresh parameter names for each of them, using each lifetime parameter as a generic argument to the generated existential type. This doesn't currently successfully allow multiple argument-position elided lifetimes since `existential type` doesn't yet support multiple lifetimes where neither outlive the other: ```rust existential type Foo<'a, 'b>:; // error: ambiguous lifetime bound in `impl Trait` fn foo<'a, 'b>(_: &'a u8, _: &'b u8) -> Foo<'a, 'b> { () } ``` This requires a separate fix. Fix rust-lang#59001 Fix rust-lang#58885 Fix rust-lang#55324 Fix rust-lang#54974 Progress on rust-lang#56238 r? @nikomatsakis
Implement useful steps_between for all integers We can use `usize::try_from` to convert steps from any size of integer. This enables a meaningful `size_hint()` for larger ranges, rather than always just `(0, None)`. Now they return the true `(len, Some(len))` when it fits, otherwise `(usize::MAX, None)` for overflow.
…uietMisdreavus Speed up rustdoc run a bit r? @QuietMisdreavus
Support allocating iterators with arenas Split out from rust-lang#57173. r? @michaelwoerister
…nkfelix Fixes for shallow borrows * Don't promote these borrows if we're going to remove them before codegen * Correctly mark unreachable code
…InterpError, r=oli-obk Renames `EvalErrorKind` to `InterpError` This PR renames `EvalErrorKind` to `InterpError`. This is related to rust-lang#54395.
…r=alexcrichton SGX target: convert a bunch of panics to aborts Fixes fortanix/rust-sgx#86, fortanix/rust-sgx#103 and in general protect preemptively against Iago attacks by aborting instead of unwinding in potentially unexpected situations.
@bors r+ p=8 |
📌 Commit d0d3466 has been approved by |
bors
added a commit
that referenced
this pull request
Apr 2, 2019
Rollup of 8 pull requests Successful merges: - #59262 (Remove duplicated code from Iterator::{ne, lt, le, gt, ge}) - #59286 (Refactor async fn return type lowering) - #59444 (Implement useful steps_between for all integers) - #59452 (Speed up rustdoc run a bit) - #59533 (Support allocating iterators with arenas) - #59585 (Fixes for shallow borrows) - #59607 (Renames `EvalErrorKind` to `InterpError`) - #59613 (SGX target: convert a bunch of panics to aborts) Failed merges: - #59630 (Shrink `mir::Statement`.) r? @ghost
☀️ Test successful - checks-travis, status-appveyor |
This was referenced Apr 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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:
EvalErrorKind
toInterpError
#59607 (RenamesEvalErrorKind
toInterpError
)Failed merges:
mir::Statement
. #59630 (Shrinkmir::Statement
.)r? @ghost