Fix rebase fallout
This commit is contained in:
parent
6a9dbd2e0e
commit
7a9aa4f980
5 changed files with 22 additions and 8 deletions
|
@ -252,8 +252,7 @@ macro_rules! define_dep_nodes {
|
|||
/// has been removed.
|
||||
fn extract_def_id(&self, tcx: TyCtxt<'tcx>) -> Option<DefId> {
|
||||
if self.kind.can_reconstruct_query_key() {
|
||||
let def_path_hash = DefPathHash(self.hash);
|
||||
tcx.queries.on_disk_cache.as_ref()?.def_path_hash_to_def_id(tcx, def_path_hash)
|
||||
tcx.queries.on_disk_cache.as_ref()?.def_path_hash_to_def_id(tcx, DefPathHash(self.hash.into()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
@ -326,7 +325,9 @@ impl<'tcx> DepNodeParams<TyCtxt<'tcx>> for DefId {
|
|||
// we will use the old DefIndex as an initial guess for
|
||||
// a lookup into the crate metadata.
|
||||
if !self.is_local() {
|
||||
tcx.queries.on_disk_cache.store_foreign_def_id_hash(*self, hash);
|
||||
if let Some(cache) = &tcx.queries.on_disk_cache {
|
||||
cache.store_foreign_def_id_hash(*self, hash);
|
||||
}
|
||||
}
|
||||
hash.0
|
||||
}
|
||||
|
|
|
@ -92,7 +92,9 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
|
|||
type StableHashingContext = StableHashingContext<'tcx>;
|
||||
|
||||
fn register_reused_dep_path_hash(&self, hash: DefPathHash) {
|
||||
self.queries.on_disk_cache.register_reused_dep_path_hash(hash)
|
||||
if let Some(cache) = self.queries.on_disk_cache.as_ref() {
|
||||
cache.register_reused_dep_path_hash(hash)
|
||||
}
|
||||
}
|
||||
|
||||
fn create_stable_hashing_context(&self) -> Self::StableHashingContext {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue