Cut code size for feature hashing
This locally cuts ~32 kB of .text instructions.
This commit is contained in:
parent
1bcbb7c93b
commit
1487bd6a17
2 changed files with 14 additions and 6 deletions
|
@ -117,9 +117,9 @@ impl<'tcx> HashStable<StableHashingContext<'tcx>> for rustc_feature::Features {
|
|||
self.declared_lang_features.hash_stable(hcx, hasher);
|
||||
self.declared_lib_features.hash_stable(hcx, hasher);
|
||||
|
||||
self.walk_feature_fields(|feature_name, value| {
|
||||
feature_name.hash_stable(hcx, hasher);
|
||||
value.hash_stable(hcx, hasher);
|
||||
});
|
||||
self.all_features()[..].hash_stable(hcx, hasher);
|
||||
for feature in rustc_feature::UNSTABLE_FEATURES.iter() {
|
||||
feature.feature.name.hash_stable(hcx, hasher);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue