about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-10-23 19:44:17 +0200
committerRalf Jung <post@ralfj.de>2024-10-23 19:46:52 +0200
commit03048096f6c4ed89ee2a5d6c86cd8268d0bc61bd (patch)
treea9df7a6df779f6e92c9729c5f81bdf6c99d9e980
parentbe01dabfefd2daa4574b974f571c7852085d60cb (diff)
downloadrust-03048096f6c4ed89ee2a5d6c86cd8268d0bc61bd.tar.gz
rust-03048096f6c4ed89ee2a5d6c86cd8268d0bc61bd.zip
stop hashing compile-time constant
-rw-r--r--compiler/rustc_query_system/src/ich/impls_syntax.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_query_system/src/ich/impls_syntax.rs b/compiler/rustc_query_system/src/ich/impls_syntax.rs
index 29a28b10a06..0665401df8e 100644
--- a/compiler/rustc_query_system/src/ich/impls_syntax.rs
+++ b/compiler/rustc_query_system/src/ich/impls_syntax.rs
@@ -111,13 +111,8 @@ impl<'a> HashStable<StableHashingContext<'a>> for SourceFile {
 impl<'tcx> HashStable<StableHashingContext<'tcx>> for rustc_feature::Features {
     fn hash_stable(&self, hcx: &mut StableHashingContext<'tcx>, hasher: &mut StableHasher) {
         // Unfortunately we cannot exhaustively list fields here, since the
-        // struct is macro generated.
+        // struct has private fields (to ensure its invariant is maintained)
         self.enabled_lang_features().hash_stable(hcx, hasher);
         self.enabled_lib_features().hash_stable(hcx, hasher);
-
-        // FIXME: why do we hash something that is a compile-time constant?
-        for feature in rustc_feature::UNSTABLE_LANG_FEATURES.iter() {
-            feature.name.hash_stable(hcx, hasher);
-        }
     }
 }