-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Enforce T: Hash for Interned<...> #137202
Merged
Merged
Conversation
This file contains 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
This comment has been minimized.
This comment has been minimized.
This adds panicking Hash impls for several resolver types that don't actually satisfy this condition. It's not obvious to me that rustc_resolve actually upholds the Interned guarantees but fixing that seems pretty hard (the structures have at minimum some interior mutability, so it's not really recursively hashable in place...).
cbe3b6f
to
9fc7590
Compare
A nice improvement to the accessibility of the codebase. Thanks! @bors r+ |
Urgau
added a commit
to Urgau/rust
that referenced
this pull request
Feb 18, 2025
…r=saethlin Enforce T: Hash for Interned<...> This adds panicking Hash impls for several resolver types that don't actually satisfy this condition. It's not obvious to me that rustc_resolve actually upholds the Interned guarantees but fixing that seems pretty hard (the structures have at minimum some interior mutability, so it's not really recursively hashable in place...). FIXME comments as such on those impls. cc rust-lang#137196 (comment) r? `@saethlin`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#137151 (Install more signal stack trace handlers) - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg) - rust-lang#137195 (cg_clif: use exclusively ABI alignment) - rust-lang#137202 (Enforce T: Hash for Interned<...>) - rust-lang#137205 (Remove `std::os::wasi::fs::FileExt::tell`) - rust-lang#137211 (don't ICE for alias-relate goals with error term) - rust-lang#137213 (Remove `rustc_middle::mir::tcx` module.) - rust-lang#137214 (add last std diagnostic items for clippy) - rust-lang#137221 (Remove scrutinee_hir_id from ExprKind::Match) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#136750 (Make ub_check message clear that it's not an assert) - rust-lang#137151 (Install more signal stack trace handlers) - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg) - rust-lang#137195 (cg_clif: use exclusively ABI alignment) - rust-lang#137202 (Enforce T: Hash for Interned<...>) - rust-lang#137205 (Remove `std::os::wasi::fs::FileExt::tell`) - rust-lang#137211 (don't ICE for alias-relate goals with error term) - rust-lang#137214 (add last std diagnostic items for clippy) - rust-lang#137221 (Remove scrutinee_hir_id from ExprKind::Match) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2025
Rollup merge of rust-lang#137202 - Mark-Simulacrum:interned-is-hash, r=saethlin Enforce T: Hash for Interned<...> This adds panicking Hash impls for several resolver types that don't actually satisfy this condition. It's not obvious to me that rustc_resolve actually upholds the Interned guarantees but fixing that seems pretty hard (the structures have at minimum some interior mutability, so it's not really recursively hashable in place...). FIXME comments as such on those impls. cc rust-lang#137196 (comment) r? ``@saethlin``
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-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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 adds panicking Hash impls for several resolver types that don't actually satisfy this condition. It's not obvious to me that rustc_resolve actually upholds the Interned guarantees but fixing that seems pretty hard (the structures have at minimum some interior mutability, so it's not really recursively hashable in place...). FIXME comments as such on those impls.
cc #137196 (comment)
r? @saethlin