1
Fork 0

Make can_reconstruct_query_key a function pointer.

This commit is contained in:
Camille GILLOT 2020-10-27 19:49:10 +01:00
parent 5027f1c6ea
commit 438c430c76
2 changed files with 61 additions and 35 deletions

View file

@ -26,6 +26,11 @@ pub type SerializedDepGraph = rustc_query_system::dep_graph::SerializedDepGraph<
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 @@ impl rustc_query_system::dep_graph::DepKind for DepKind {
op(icx.task_deps)
})
}
fn can_reconstruct_query_key(&self) -> bool {
DepKind::can_reconstruct_query_key(self)
}
}
impl<'tcx> DepContext for TyCtxt<'tcx> {