]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/dep_graph/mod.rs
Make can_reconstruct_query_key a function pointer.
[rust.git] / compiler / rustc_middle / src / dep_graph / mod.rs
index 546c3877e4d8e234f55dfeaa2f88a9c47244418d..d4cbbfa86ae2bc0b1828f32694d4447a027cb0fa 100644 (file)
 impl rustc_query_system::dep_graph::DepKind for DepKind {
     const NULL: Self = DepKind::Null;
 
+    #[inline(always)]
+    fn can_reconstruct_query_key(&self) -> bool {
+        DepKind::can_reconstruct_query_key(self)
+    }
+
     #[inline(always)]
     fn is_eval_always(&self) -> bool {
         self.is_eval_always
@@ -83,10 +88,6 @@ fn read_deps<OP>(op: OP)
             op(icx.task_deps)
         })
     }
-
-    fn can_reconstruct_query_key(&self) -> bool {
-        DepKind::can_reconstruct_query_key(self)
-    }
 }
 
 impl<'tcx> DepContext for TyCtxt<'tcx> {