-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Just derive Hashstable in librustc #66457
Conversation
@@ -827,3 +831,21 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { | |||
frames | |||
} | |||
} | |||
|
|||
impl<'ctx, 'mir, 'tcx, Tag, Extra> HashStable<StableHashingContext<'ctx>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this impl come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expanded the macro because I planned to remove it in a subsequent commit. I can revert this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe just revert it from this PR and leave it for later.
instance, | ||
span, | ||
return_to_block, | ||
return_place -> (return_place.as_ref().map(|r| &**r)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the impl was here.
@oli-obk What is going on here? Is this ignoring part of the frame for hashing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's going on here, but there's nothing being ignored. Maybe it's just some missing impls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me it's skipping the layout
field of PlaceTy
. Is that intentional? If so, could it be skipped on the impl for PlaceTy
?
@bors r+ |
📌 Commit f2b687da5488ea5170d7e1abd3e8f16580eecbbe has been approved by |
☔ The latest upstream changes (presumably #66384) made this pull request unmergeable. Please resolve the merge conflicts. |
f2b687d
to
279d2db
Compare
@bors r+ |
📌 Commit 279d2dbf3815acb1be416feeb44890ec5c61d659 has been approved by |
@cjgillot Github doesn't give notifications for pushes / rebases so you'll need to tell us about those. |
☔ The latest upstream changes (presumably #66454) made this pull request unmergeable. Please resolve the merge conflicts. |
279d2db
to
579625b
Compare
Rebased. |
@@ -1848,6 +1847,7 @@ pub struct VariantDef { | |||
/// If this variant is a struct variant, then this is `None`. | |||
pub ctor_def_id: Option<DefId>, | |||
/// Variant or struct name. | |||
#[stable_hasher(project(name))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelwoerister Why are we hashing only the name and not the span here? Was this something needed for gensyms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was somehow related to gensyms. Looks like we can just hash the entire Ident
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an earlier draft, I forgot the projection attribute. As a result, some tests failed: #66279 (comment) . I did not investigate further.
@bors r+ |
📌 Commit 579625b has been approved by |
Just derive Hashstable in librustc Split out of rust-lang#66279 r? @Zoxc
Rollup of 7 pull requests Successful merges: - #66060 (Making ICEs and test them in incremental) - #66298 (rustdoc: fixes #64305: disable search field instead of hidding it) - #66457 (Just derive Hashstable in librustc) - #66496 (rustc_metadata: Privatize more things) - #66514 (Fix selected crate search filter) - #66535 (Avoid ICE when `break`ing to an unreachable label) - #66573 (Ignore run-make reproducible-build-2 on Mac) Failed merges: r? @ghost
Split out of #66279
r? @Zoxc