Don't require a QueryContext to access the DepGraph.
This commit is contained in:
parent
7794fbb478
commit
211b05aef3
6 changed files with 13 additions and 14 deletions
|
@ -79,7 +79,7 @@ impl<K: DepKind> DepNode<K> {
|
|||
|
||||
pub fn construct<Ctxt, Key>(tcx: Ctxt, kind: K, arg: &Key) -> DepNode<K>
|
||||
where
|
||||
Ctxt: crate::query::QueryContext<DepKind = K>,
|
||||
Ctxt: super::DepContext<DepKind = K>,
|
||||
Key: DepNodeParams<Ctxt>,
|
||||
{
|
||||
let hash = arg.to_fingerprint(tcx);
|
||||
|
|
|
@ -29,6 +29,9 @@ pub trait DepContext: Copy {
|
|||
fn debug_dep_tasks(&self) -> bool;
|
||||
fn debug_dep_node(&self) -> bool;
|
||||
|
||||
/// Access the DepGraph.
|
||||
fn dep_graph(&self) -> &DepGraph<Self::DepKind>;
|
||||
|
||||
/// Try to force a dep node to execute and see if it's green.
|
||||
fn try_force_from_dep_node(&self, dep_node: &DepNode<Self::DepKind>) -> bool;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue