make some rustc_feature internals private, and ensure invariants with debug assertions
This commit is contained in:
parent
46ce5cbf33
commit
1381773e01
6 changed files with 62 additions and 26 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue