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

Wean HashSet from the raw-entry API #555

Merged
merged 3 commits into from
Sep 18, 2024
Merged

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Sep 12, 2024

This changes get_or_insert, get_or_insert_with, and bitxor_assign
to poke directly at the RawTable instead of using raw_entry_mut().

HashSet::get_or_insert_with also asserts that the converted value is
actually equivalent after conversion, so we can ensure set consistency.
HashSet::get_or_insert_owned is removed for now, since it offers no
value over the _with method, as we would need to assert that too.

@Amanieu
Copy link
Member

Amanieu commented Sep 18, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Sep 18, 2024

📌 Commit dd26cdb has been approved by Amanieu

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 18, 2024

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout set-no-raw_entry (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self set-no-raw_entry --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging src/set.rs
CONFLICT (content): Merge conflict in src/set.rs
Auto-merging src/map.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors
Copy link
Contributor

bors commented Sep 18, 2024

☔ The latest upstream changes (presumably #554) made this pull request unmergeable. Please resolve the merge conflicts.

cuviper and others added 3 commits September 18, 2024 08:20
This changes `get_or_insert`, `get_or_insert_with`, and `bitxor_assign`
to poke directly at the `RawTable` instead of using `raw_entry_mut()`.

`HashSet::get_or_insert_with` also asserts that the converted value is
actually equivalent after conversion, so we can ensure set consistency.
`HashSet::get_or_insert_owned` is removed for now, since it offers no
value over the `_with` method, as we would need to assert that too.
Co-authored-by: JustForFun88 <alishergaliev88@gmail.com>
@cuviper
Copy link
Member Author

cuviper commented Sep 18, 2024

The conflict was simply in the placement of new tests.

@bors r=Amanieu

@bors
Copy link
Contributor

bors commented Sep 18, 2024

📌 Commit 6420cfd has been approved by Amanieu

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 18, 2024

⌛ Testing commit 6420cfd with merge 1587f07...

bors added a commit that referenced this pull request Sep 18, 2024
Wean `HashSet` from the raw-entry API

This changes `get_or_insert`, `get_or_insert_with`, and `bitxor_assign`
to poke directly at the `RawTable` instead of using `raw_entry_mut()`.

`HashSet::get_or_insert_with` also asserts that the converted value is
actually equivalent after conversion, so we can ensure set consistency.
`HashSet::get_or_insert_owned` is removed for now, since it offers no
value over the `_with` method, as we would need to assert that too.
@bors
Copy link
Contributor

bors commented Sep 18, 2024

💥 Test timed out

@cuviper
Copy link
Member Author

cuviper commented Sep 18, 2024

@bors retry

@bors
Copy link
Contributor

bors commented Sep 18, 2024

⌛ Testing commit 6420cfd with merge 67f704e...

@bors
Copy link
Contributor

bors commented Sep 18, 2024

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 67f704e to master...

@bors bors merged commit 67f704e into rust-lang:master Sep 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants