Skip to content

Derive Copy and Hash for IntErrorKind #131923

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

ranger-ross
Copy link
Contributor

@ranger-ross ranger-ross commented Oct 19, 2024

This PR derives Copy and Hash for IntErrorKind to make it easier to work with. (see #131826)

I think an argument could be made to also derive PartialOrd + Ord as well given that other error kinds in the std like io::ErrorKind do this. Granted these seem much less useful for errors.

Fixes #131826

@rustbot
Copy link
Collaborator

rustbot commented Oct 19, 2024

r? @joboet

rustbot has assigned @joboet.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Oct 19, 2024
@joboet
Copy link
Member

joboet commented Oct 19, 2024

Makes sense to me, but this will need FCP.
r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Oct 19, 2024
@rustbot rustbot assigned m-ou-se and unassigned joboet Oct 19, 2024
@tgross35 tgross35 added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Dec 13, 2024
@tgross35
Copy link
Contributor

This is a pretty easy change, nominating to get it on the radar.

@rustbot label +I-libs-api-nominated

@rustbot rustbot added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Dec 18, 2024
@tgross35 tgross35 added the Libs-Small Libs issues that are considered "small" or self-contained label Dec 20, 2024
@m-ou-se m-ou-se removed the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jan 7, 2025
@m-ou-se
Copy link
Member

m-ou-se commented Jan 7, 2025

@rfcbot merge

@rfcbot
Copy link
Collaborator

rfcbot commented Jan 7, 2025

Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jan 7, 2025
@dtolnay dtolnay removed the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Jan 14, 2025
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jan 27, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Jan 27, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Feb 6, 2025
@rfcbot
Copy link
Collaborator

rfcbot commented Feb 6, 2025

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Feb 13, 2025
@Enselic
Copy link
Member

Enselic commented Jul 2, 2025

Triage: What's holding this back from being merged? Maybe it was just forgotten?

@tgross35
Copy link
Contributor

tgross35 commented Jul 2, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 2, 2025

📌 Commit 739f4ac has been approved by tgross35

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 Jul 2, 2025
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 11 pull requests

Successful merges:

 - #131923 (Derive `Copy` and `Hash` for `IntErrorKind`)
 - #138340 (Remove some unsized tuple impls now that we don't support unsizing tuples anymore)
 - #141219 (Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global`)
 - #142212 (bootstrap: validate `rust.codegen-backends` & `target.<triple>.codegen-backends`)
 - #142237 (Detect more cases of unused_parens around types)
 - #142964 (Attribute rework: a parser for single attributes without arguments)
 - #143070 (Rewrite `macro_rules!` parser to not use the MBE engine itself)
 - #143235 (Assemble const bounds via normal item bounds in old solver too)
 - #143261 (Feed `explicit_predicates_of` instead of `predicates_of`)
 - #143276 (loop match: handle opaque patterns)
 - #143306 (Add `track_caller` attributes to trace origin of Clippy lints)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 11 pull requests

Successful merges:

 - #131923 (Derive `Copy` and `Hash` for `IntErrorKind`)
 - #138340 (Remove some unsized tuple impls now that we don't support unsizing tuples anymore)
 - #141219 (Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global`)
 - #142212 (bootstrap: validate `rust.codegen-backends` & `target.<triple>.codegen-backends`)
 - #142237 (Detect more cases of unused_parens around types)
 - #142964 (Attribute rework: a parser for single attributes without arguments)
 - #143070 (Rewrite `macro_rules!` parser to not use the MBE engine itself)
 - #143235 (Assemble const bounds via normal item bounds in old solver too)
 - #143261 (Feed `explicit_predicates_of` instead of `predicates_of`)
 - #143276 (loop match: handle opaque patterns)
 - #143306 (Add `track_caller` attributes to trace origin of Clippy lints)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
@bors bors merged commit e0499e4 into rust-lang:master Jul 3, 2025
6 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 3, 2025
rust-timer added a commit that referenced this pull request Jul 3, 2025
Rollup merge of #131923 - ranger-ross:impl-copy-hash-interrorkind, r=tgross35

Derive `Copy` and `Hash` for `IntErrorKind`

This PR derives `Copy` and `Hash` for `IntErrorKind` to make it easier to work with. (see #131826)

I think an argument could be made to also derive `PartialOrd` + `Ord` as well given that other error kinds in the std like [`io::ErrorKind`](https://doc.rust-lang.org/src/std/io/error.rs.html#212-428) do this. Granted these seem much less useful for errors.

Fixes #131826
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 11, 2025
…rkind, r=tgross35

Derive `Copy` and `Hash` for `IntErrorKind`

This PR derives `Copy` and `Hash` for `IntErrorKind` to make it easier to work with. (see rust-lang#131826)

I think an argument could be made to also derive `PartialOrd` + `Ord` as well given that other error kinds in the std like [`io::ErrorKind`](https://doc.rust-lang.org/src/std/io/error.rs.html#212-428) do this. Granted these seem much less useful for errors.

Fixes rust-lang#131826
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 11, 2025
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#131923 (Derive `Copy` and `Hash` for `IntErrorKind`)
 - rust-lang#138340 (Remove some unsized tuple impls now that we don't support unsizing tuples anymore)
 - rust-lang#141219 (Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global`)
 - rust-lang#142212 (bootstrap: validate `rust.codegen-backends` & `target.<triple>.codegen-backends`)
 - rust-lang#142237 (Detect more cases of unused_parens around types)
 - rust-lang#142964 (Attribute rework: a parser for single attributes without arguments)
 - rust-lang#143070 (Rewrite `macro_rules!` parser to not use the MBE engine itself)
 - rust-lang#143235 (Assemble const bounds via normal item bounds in old solver too)
 - rust-lang#143261 (Feed `explicit_predicates_of` instead of `predicates_of`)
 - rust-lang#143276 (loop match: handle opaque patterns)
 - rust-lang#143306 (Add `track_caller` attributes to trace origin of Clippy lints)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. Libs-Small Libs issues that are considered "small" or self-contained needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IntErrorKind should derive Copy and Hash
10 participants