Skip to content

Commit 8512d2e

Browse files
Avoid deconstructing pointer for hashing
1 parent aae1215 commit 8512d2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc_middle/ty/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1621,8 +1621,9 @@ impl<'tcx> fmt::Debug for ParamEnv<'tcx> {
16211621

16221622
impl<'tcx> Hash for ParamEnv<'tcx> {
16231623
fn hash<H: Hasher>(&self, state: &mut H) {
1624-
self.caller_bounds().hash(state);
1625-
self.reveal().hash(state);
1624+
// List hashes as the raw pointer, so we can skip splitting into the
1625+
// pointer and the enum.
1626+
self.packed_data.hash(state);
16261627
self.def_id.hash(state);
16271628
}
16281629
}

0 commit comments

Comments
 (0)