Skip to content

Commit

Permalink
stop hashing compile-time constant
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 23, 2024
1 parent be01dab commit 0304809
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/rustc_query_system/src/ich/impls_syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit 0304809

Please sign in to comment.