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 10 pull requests #79319

Merged
merged 25 commits into from
Nov 23, 2020
Merged

Rollup of 10 pull requests #79319

merged 25 commits into from
Nov 23, 2020

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Nov 22, 2020

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

camelid and others added 25 commits November 5, 2020 17:12
This commit also makes fields of `Take` private. I have no idea why they
were `pub(super)` before.
Some UI tests started failing after moving iterator adapters to different modules.
Yes, the order of evaluation *does* change depending on the types of
the operands. Cursed, I know.

I've elected to place this test into `expr/compound-assignment` creating
both the `expr` directory and the `compound-assignment` directory. I
plan in a future PR to also move the `if` directory and the loose `if`
tests into `expr/if` and other similar cleanups of the `test/ui`
directory.

Future work: Test more than just `+=`, but all operators. I don't know
if using a macro to generate these tests cases would be okay or not,
but it'd be boilerplatey without it. I'm also confident you cannot
change the evaluation order of one operator without changing all of
them.

Future work: Additionally, test more than just `i32 += i32` for the
primitive version. I don't actually know the full set of primitive
implementations, but I imagine there's enough to cause a combinatorial
explosion with the previous future work item. Somewhere on the order of
one to two hundred individual functions.
Stabilizes rust-lang#67521. In particular the following stable methods are stabilized as const fn:

* size
* align
* from_size_align
Add f{32,64}::is_subnormal

The docs recommend that you use dedicated methods instead of calling `classify` directly, although there isn't actually a way of checking if a number is subnormal without calling classify. There are dedicated methods for all other forms, excluding `is_zero` (which is just `== 0.0` anyway).
…=m-ou-se

Split each iterator adapter and source into individual modules

This PR creates individual modules for each iterator adapter and iterator source.

This is done to enhance the readability of corresponding modules (`adapters/mod.rs` and `sources.rs`) which were hard to navigate and read because of lots of repeated lines (e.g.: `adapters/mod.rs` was 3k lines long). This is also in line with some adapters which already had their own modules (`Flatten`, `FlatMap`, `Chain`, `Zip`, `Fuse`).

This PR also makes `Take`s adapter fields private (I have no idea why they were `pub(super)` before).

r? ``@LukasKalbertodt``
Stabilize alloc::Layout const functions

Stabilizes rust-lang#67521. In particular the following stable methods are stabilized as `const fn`:

* `size`
* `align`
* `from_size_align`

Stabilizing `size` and `align` should not be controversial as they are simple (usize and NonZeroUsize) fields and I don't think there's any reason to make them not const compatible in the future. That being true, the other methods are trivially `const`. The only other issue being returning a `Result` from a `const fn` but this has been made more usable by recent stabilizations.
…r=m-ou-se

Stabilize refcell_take

Tracking Issue: rust-lang#71395

``@KodrAus`` nominated this for FCP, so here's a PR!
I've never made a stabilization PR, so please mention if there's anything I can improve, thanks.
…mulacrum

BTreeMap: address namespace conflicts

Fix an annoyance popping up whenever synchronizing the test cases with a version capable of miri-track-raw-pointers.

r? `@Mark-Simulacrum`
…gn, r=Mark-Simulacrum

Add test for eval order for a+=b

Yes, the order of evaluation *does* change depending on the types of
the operands. Cursed, I know.

I've elected to place this test into `expr/compound-assignment` creating
both the `expr` directory and the `compound-assignment` directory. I
plan in a future PR to also move the `if` directory and the loose `if`
tests into `expr/if` and other similar cleanups of the `test/ui`
directory.

Future work: Test more than just `+=`, but all operators. I don't know
if using a macro to generate these tests cases would be okay or not,
but it'd be boilerplatey without it. I'm also confident you cannot
change the evaluation order of one operator without changing all of
them.

Future work: Additionally, test more than just `i32 += i32` for the
primitive version. I don't actually know the full set of primitive
implementations, but I imagine there's enough to cause a combinatorial
explosion with the previous future work item. Somewhere on the order of
one to two hundred individual functions.
…ulacrum

BTreeMap: fix minor testing mistakes in rust-lang#78903

Mostly a duplicate test case
r? `@Mark-Simulacrum`
…mulacrum

BTreeMap: swap the names of NodeRef::new and Root::new_leaf

rust-lang#78104 preserved the name of Root::new_leaf to minimize changes, but the resulting names are confusing.

r? `@Mark-Simulacrum`
Stabilise `then`

Stabilises the lazy variant of rust-lang#64260 now that the FCP [has ended](rust-lang#64260 (comment)).

I've kept the original feature gate `bool_to_option` for the strict variant (`then_some`), and created a new insta-stable feature gate `lazy_bool_to_option` for `then`.
@rustbot rustbot added the rollup A PR which is a rollup label Nov 22, 2020
@m-ou-se
Copy link
Member Author

m-ou-se commented Nov 22, 2020

@bors r+ p=10 rollup=never

@bors
Copy link
Contributor

bors commented Nov 22, 2020

📌 Commit 41c033b 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 Nov 22, 2020
@bors
Copy link
Contributor

bors commented Nov 22, 2020

⌛ Testing commit 41c033b with merge 32da90b...

@bors
Copy link
Contributor

bors commented Nov 23, 2020

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing 32da90b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 23, 2020
@bors bors merged commit 32da90b into rust-lang:master Nov 23, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 23, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.