Uh oh!
There was an error while loading. Please reload this page.
Derive Hash for rustc_public types - #145018
Merged
Merged
Conversation
rustbot
commented
Aug 6, 2025
Collaborator
rustbot
commented
Aug 6, 2025
Collaborator
scottmcm
reviewed
Aug 7, 2025
| } | ||
| #[derive(Clone, Copy, PartialEq, Eq, Serialize)] | ||
| impl<T: std::hash::Hash> std::hash::Hash for Placeholder<T> { |
Member
There was a problem hiding this comment.
Why isn't this also derived? If it's deriving Eq and PartialEq, it should almost certainly be deriving Hash too.
ContributorAuthor
There was a problem hiding this comment.
Sorry, my bad! I didn't realize the derive macro could handle generics. Just fixed this now
AlexanderPortland
commented
Aug 7, 2025
ContributorAuthor
@rustbot ready |
scottmcm
commented
Aug 7, 2025
Member
Sounds good to me; these things that are already @bors r+ rollup |
bors
commented
Aug 7, 2025
Collaborator
tgross35 added a commit
to tgross35/rust
that referenced
this pull request
Aug 7, 2025
…h, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
bors added a commit
that referenced
this pull request
Aug 7, 2025
Rollup of 8 pull requests Successful merges: - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - #144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - #144900 (Stabilize `unsigned_signed_diff` feature) - #144903 (Rename `begin_panic_handler` to `panic_handler`) - #144974 (compiler-builtins subtree update) - #145004 (Couple of minor cleanups) - #145007 (Fix build/doc/test of error index generator) - #145018 (Derive `Hash` for rustc_public types) r? `@ghost` `@rustbot` modify labels: rollup
tgross35 added a commit
to tgross35/rust
that referenced
this pull request
Aug 7, 2025
…h, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
tgross35 added a commit
to tgross35/rust
that referenced
this pull request
Aug 8, 2025
…h, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
bors added a commit
that referenced
this pull request
Aug 8, 2025
Rollup of 9 pull requests Successful merges: - #144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - #144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - #144900 (Stabilize `unsigned_signed_diff` feature) - #144903 (Rename `begin_panic_handler` to `panic_handler`) - #144974 (compiler-builtins subtree update) - #145007 (Fix build/doc/test of error index generator) - #145018 (Derive `Hash` for rustc_public types) - #145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - #145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
Uh oh!
There was an error while loading. Please reload this page.
rust-timer added a commit
that referenced
this pull request
Aug 8, 2025
Rollup merge of #145018 - AlexanderPortland:rustc-public-hash, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
github-actionsBot
pushed a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Aug 9, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
github-actionsBot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 9, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
rust-cloud-vmsBot
pushed a commit
to makai410/rustc_public
that referenced
this pull request
Aug 16, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
rust-cloud-vmsBot
pushed a commit
to makai410/rustc_public
that referenced
this pull request
Aug 20, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
makai410 pushed a commit
to makai410/rust
that referenced
this pull request
Nov 8, 2025
…h, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
makai410 pushed a commit
to makai410/rust
that referenced
this pull request
Nov 8, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang#144974 (compiler-builtins subtree update) - rust-lang#145007 (Fix build/doc/test of error index generator) - rust-lang#145018 (Derive `Hash` for rustc_public types) - rust-lang#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
makai410 pushed a commit
to makai410/rust
that referenced
this pull request
Nov 10, 2025
…h, r=scottmcm Derive `Hash` for rustc_public types This derives `Hash` for the rustc_public versions of `Rvalue`, `Place`, `Span`, and all the types they contain. As far as I can tell, the internal versions of all these types already implement `Hash`, so it would be helpful if the public versions implemented it too!
makai410 pushed a commit
to makai410/rust
that referenced
this pull request
Nov 10, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang#144974 (compiler-builtins subtree update) - rust-lang#145007 (Fix build/doc/test of error index generator) - rust-lang#145018 (Derive `Hash` for rustc_public types) - rust-lang#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
makai410 pushed a commit
to makai410/rustc_public
that referenced
this pull request
Nov 16, 2025
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
tgross35 pushed a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Jan 31, 2026
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
makai410 pushed a commit
to makai410/rustc_public
that referenced
this pull request
Mar 27, 2026
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This derives
Hashfor the rustc_public versions ofRvalue,Place,Span, and all the types they contain. As far as I can tell, the internal versions of all these types already implementHash, so it would be helpful if the public versions implemented it too!