make some rustc_feature internals private, and ensure invariants with debug assertions
This commit is contained in:
@@ -112,8 +112,8 @@ 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.
|
||||
self.enabled_lang_features.hash_stable(hcx, hasher);
|
||||
self.enabled_lib_features.hash_stable(hcx, hasher);
|
||||
self.enabled_lang_features().hash_stable(hcx, hasher);
|
||||
self.enabled_lib_features().hash_stable(hcx, hasher);
|
||||
|
||||
self.all_lang_features()[..].hash_stable(hcx, hasher);
|
||||
for feature in rustc_feature::UNSTABLE_FEATURES.iter() {
|
||||
|
||||
Reference in New Issue
Block a user