about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-12 03:44:53 -0700
committerGitHub <noreply@github.com>2021-09-12 03:44:53 -0700
commitbb5ca58d290791c01d7bb40fd59f5a3275603310 (patch)
treeb7320e9fd1c3fce35f028ce4d63bbdd850c6d76f /compiler/rustc_data_structures/src
parent6d4f27ebc7b9ff77e3360e1f0c01d010b455b4da (diff)
parent294510e1bb7e03bd462f6a6db2fab5f56fae1c8c (diff)
downloadrust-bb5ca58d290791c01d7bb40fd59f5a3275603310.tar.gz
rust-bb5ca58d290791c01d7bb40fd59f5a3275603310.zip
Rollup merge of #88677 - petrochenkov:exportid, r=davidtwco
rustc: Remove local variable IDs from `Export`s

Local variables can never be exported.
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/lib.rs1
-rw-r--r--compiler/rustc_data_structures/src/stable_hasher.rs6
2 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs
index d128a688e75..dd6a17b92ae 100644
--- a/compiler/rustc_data_structures/src/lib.rs
+++ b/compiler/rustc_data_structures/src/lib.rs
@@ -21,6 +21,7 @@
 #![feature(iter_map_while)]
 #![feature(maybe_uninit_uninit_array)]
 #![feature(min_specialization)]
+#![feature(never_type)]
 #![feature(type_alias_impl_trait)]
 #![feature(new_uninit)]
 #![feature(nll)]
diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs
index 18b352cf3b0..354f9dd93cc 100644
--- a/compiler/rustc_data_structures/src/stable_hasher.rs
+++ b/compiler/rustc_data_structures/src/stable_hasher.rs
@@ -209,6 +209,12 @@ impl_stable_hash_via_hash!(i128);
 impl_stable_hash_via_hash!(char);
 impl_stable_hash_via_hash!(());
 
+impl<CTX> HashStable<CTX> for ! {
+    fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {
+        unreachable!()
+    }
+}
+
 impl<CTX> HashStable<CTX> for ::std::num::NonZeroU32 {
     fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
         self.get().hash_stable(ctx, hasher)