about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-21 03:09:04 +0000
committerbors <bors@rust-lang.org>2020-07-21 03:09:04 +0000
commitb52522ade1f6979a35b24087dadcf5ba5c981cbe (patch)
tree67c849a1e6ac611aa3a4eb502b92c9e88c0e225c /src/librustc_data_structures
parent734233d29771869f824d8ddbaddabb90b3b68e03 (diff)
parent4b99699c8407f38df1e0ec1c22488c558d414582 (diff)
Auto merge of #69749 - davidtwco:issue-46477-polymorphization, r=eddyb
Polymorphization

This PR implements an analysis to detect when functions could remain polymorphic during code generation.

Fixes #46477

r? @eddyb
cc @rust-lang/wg-mir-opt @nikomatsakis @pnkfelix
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/stable_hasher.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs
index 97b02eaef35..c1c79b174f4 100644
--- a/src/librustc_data_structures/stable_hasher.rs
+++ b/src/librustc_data_structures/stable_hasher.rs
@@ -469,6 +469,15 @@ impl<R: vec::Idx, C: vec::Idx, CTX> HashStable<CTX> for bit_set::BitMatrix<R, C>
     }
 }
 
+impl<T, CTX> HashStable<CTX> for bit_set::FiniteBitSet<T>
+where
+    T: HashStable<CTX> + bit_set::FiniteBitSetTy,
+{
+    fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
+        self.0.hash_stable(hcx, hasher);
+    }
+}
+
 impl_stable_hash_via_hash!(::std::path::Path);
 impl_stable_hash_via_hash!(::std::path::PathBuf);