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

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs #114605

Merged
merged 1 commit into from
Aug 20, 2023
Merged

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs #114605

merged 1 commit into from
Aug 20, 2023

Conversation

Easyoakland
Copy link
Contributor

@Easyoakland Easyoakland commented Aug 8, 2023

As discussed here the description of logic errors in HashMap and HashSet does not explicitly apply to

k1 == k2 -> hash(k1) == hash(k2)

but this is likely what is intended.

This PR is a small doc change to correct this.

r? rust-lang/libs

@rustbot
Copy link
Collaborator

rustbot commented Aug 8, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 8, 2023
@thomcc
Copy link
Member

thomcc commented Aug 18, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 18, 2023

📌 Commit 98e434a has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 18, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 18, 2023
…=thomcc

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs

As discussed [here](https://users.rust-lang.org/t/what-hapens-if-hash-and-partialeq-dont-match-when-using-hashmap/98052/13) the description of logic errors in `HashMap` and `HashSet` does not explicitly apply to
```text
k1 == k2 -> hash(k1) == hash(k2)
```
but this is likely what is intended.

This PR is a small doc change to correct this.

r? rust-lang/libs
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 19, 2023
…=thomcc

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs

As discussed [here](https://users.rust-lang.org/t/what-hapens-if-hash-and-partialeq-dont-match-when-using-hashmap/98052/13) the description of logic errors in `HashMap` and `HashSet` does not explicitly apply to
```text
k1 == k2 -> hash(k1) == hash(k2)
```
but this is likely what is intended.

This PR is a small doc change to correct this.

r? rust-lang/libs
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 19, 2023
…=thomcc

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs

As discussed [here](https://users.rust-lang.org/t/what-hapens-if-hash-and-partialeq-dont-match-when-using-hashmap/98052/13) the description of logic errors in `HashMap` and `HashSet` does not explicitly apply to
```text
k1 == k2 -> hash(k1) == hash(k2)
```
but this is likely what is intended.

This PR is a small doc change to correct this.

r? rust-lang/libs
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 19, 2023
…=thomcc

Increase clarity about Hash - Eq consistency in HashMap and HashSet docs

As discussed [here](https://users.rust-lang.org/t/what-hapens-if-hash-and-partialeq-dont-match-when-using-hashmap/98052/13) the description of logic errors in `HashMap` and `HashSet` does not explicitly apply to
```text
k1 == k2 -> hash(k1) == hash(k2)
```
but this is likely what is intended.

This PR is a small doc change to correct this.

r? rust-lang/libs
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 19, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#114605 (Increase clarity about Hash - Eq consistency in HashMap and HashSet docs)
 - rust-lang#114934 (instantiate response: no unnecessary new universe)
 - rust-lang#114950 (Inline strlen_rt in CStr::from_ptr)
 - rust-lang#114973 (Expose core::error::request_value in std)
 - rust-lang#114983 (Usage zero as language id for `FormatMessageW()`)
 - rust-lang#114991 (remove redundant var rebindings)
 - rust-lang#114992 (const-eval: ensure we never const-execute a function marked rustc_do_not_const_check)
 - rust-lang#115001 (clippy::perf stuff)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0cc4b55 into rust-lang:master Aug 20, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants