]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/dep_graph/mod.rs
Make try_load_from_on_disk_cache a function pointer.
[rust.git] / compiler / rustc_middle / src / dep_graph / mod.rs
index d4cbbfa86ae2bc0b1828f32694d4447a027cb0fa..88441af674d33c0f151ffa6266e1bb8581be19b8 100644 (file)
@@ -1,5 +1,4 @@
 use crate::ich::StableHashingContext;
-use crate::ty::query::try_load_from_on_disk_cache;
 use crate::ty::{self, TyCtxt};
 use rustc_data_structures::profiling::SelfProfilerRef;
 use rustc_data_structures::sync::Lock;
@@ -169,7 +168,7 @@ fn diagnostic(&self) -> &rustc_errors::Handler {
 
     // Interactions with on_disk_cache
     fn try_load_from_on_disk_cache(&self, dep_node: &DepNode) {
-        try_load_from_on_disk_cache(*self, dep_node)
+        (dep_node.kind.try_load_from_on_disk_cache)(*self, dep_node)
     }
 
     fn load_diagnostics(&self, prev_dep_node_index: SerializedDepNodeIndex) -> Vec<Diagnostic> {