Move ICH to rustc_query_system.
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
//! which are available for use externally when compiled as a library.
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_query_system::ich::{NodeIdHashingMode, StableHashingContext};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use std::hash::Hash;
|
||||
|
||||
@@ -53,3 +55,12 @@ impl<Id> Default for AccessLevels<Id> {
|
||||
AccessLevels { map: Default::default() }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> HashStable<StableHashingContext<'a>> for AccessLevels {
|
||||
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
|
||||
hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
|
||||
let AccessLevels { ref map } = *self;
|
||||
map.hash_stable(hcx, hasher);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user