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 5 pull requests #69309

Merged
merged 13 commits into from
Feb 20, 2020
Merged

Rollup of 5 pull requests #69309

merged 13 commits into from
Feb 20, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

mjbshaw and others added 13 commits February 7, 2020 21:53
I believe the previous code was calling `ops::Add::add` instead of the
`+` operator to get this behavior.
LinkedList::remove() removes the element at the specified index and returns it.

Signed-off-by: Bijan Tabatabai <bijan311@yahoo.com>
Add LinkedList::remove()

LinkedList::remove() removes the element at the specified index and returns it.

I added this because I think having a remove function would be useful to have, and similar functions are in other containers, like Vec and HashMap.

I'm not sure if adding a feature like this requires an RFC or not, so I'm sorry if this PR is premature.
…albertodt

Stabilize Once::is_completed

Closes rust-lang#54890

This function has been around for some time. I haven't seen anyone raise any objections to it. I've personally found it useful myself. It would be nice to finally stabilize it and
…-obk

Make integer exponentiation methods unstably const

cc rust-lang#53718

This makes the following inherent methods on integer primitives into unstable `const fn`:
- `pow`
- `checked_pow`
- `wrapping_pow`
- `overflowing_pow`
- `saturating_pow`
- `next_power_of_two`
- `checked_next_power_of_two`
- `wrapping_next_power_of_two`

Only two changes were made to the implementation of these methods. First, I had to switch from the `?` operator, which is not yet implemented in a const context, to a `try_opt` macro. Second, `next_power_of_two` was using `ops::Add::add` (see the first commit) to "get overflow checks", so I switched to `#[rustc_inherit_overflow_checks]`. I'm not quite sure why the attribute wasn't used in the first place.
…iser

Fix race condition when allocating source files in SourceMap

This makes allocating address space in the source map an atomic operation. `rustc` does not currently do this in parallel, so this bug can't trigger, but parsing files in parallel could trigger it, and that is something we want to do.

Fixes rust-lang#69261.

r? @wesleywiser
@Dylan-DPC-zz Dylan-DPC-zz added the rollup A PR which is a rollup label Feb 20, 2020
@Dylan-DPC-zz
Copy link
Author

@bors r+ p=5 rollup=never

@bors
Copy link
Contributor

bors commented Feb 20, 2020

📌 Commit 941ce1a has been approved by Dylan-DPC

@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 Feb 20, 2020
@bors
Copy link
Contributor

bors commented Feb 20, 2020

⌛ Testing commit 941ce1a with merge 93711d0...

@bors
Copy link
Contributor

bors commented Feb 20, 2020

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing 93711d0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 20, 2020
@bors bors merged commit 93711d0 into rust-lang:master Feb 20, 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.

8 participants