Skip to content

Commit 2f12009

Browse files
committed
Add a comment to recover.
1 parent f445077 commit 2f12009

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc/dep_graph/dep_node.rs

+6
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,12 @@ pub(crate) trait DepNodeParams<'tcx>: fmt::Debug + Sized {
377377
format!("{:?}", self)
378378
}
379379

380+
/// This method tries to recover the query key from the given `DepNode`,
381+
/// something which is needed when forcing `DepNode`s during red-green
382+
/// evaluation. The query system will only call this method if
383+
/// `CAN_RECONSTRUCT_QUERY_KEY` is `true`.
384+
/// It is always valid to return `None` here, in which case incremental
385+
/// compilation will treat the query as having changed instead of forcing it.
380386
fn recover(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> Option<Self>;
381387
}
382388

0 commit comments

Comments
 (0)