Address review.
This commit is contained in:
parent
8785b70774
commit
b11ec29e28
2 changed files with 1 additions and 8 deletions
|
@ -124,13 +124,6 @@ pub struct DepKindStruct {
|
||||||
/// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode`
|
/// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode`
|
||||||
/// is actually a `DefPathHash`, and can therefore just look up the corresponding
|
/// is actually a `DefPathHash`, and can therefore just look up the corresponding
|
||||||
/// `DefId` in `tcx.def_path_hash_to_def_id`.
|
/// `DefId` in `tcx.def_path_hash_to_def_id`.
|
||||||
///
|
|
||||||
/// When you implement a new query, it will likely have a corresponding new
|
|
||||||
/// `DepKind`, and you'll have to support it here in `force_from_dep_node()`. As
|
|
||||||
/// a rule of thumb, if your query takes a `DefId` or `LocalDefId` as sole parameter,
|
|
||||||
/// then `force_from_dep_node()` should not fail for it. Otherwise, you can just
|
|
||||||
/// add it to the "We don't have enough information to reconstruct..." group in
|
|
||||||
/// the match below.
|
|
||||||
pub force_from_dep_node: Option<fn(tcx: TyCtxt<'_>, dep_node: DepNode) -> bool>,
|
pub force_from_dep_node: Option<fn(tcx: TyCtxt<'_>, dep_node: DepNode) -> bool>,
|
||||||
|
|
||||||
/// Invoke a query to put the on-disk cached value in memory.
|
/// Invoke a query to put the on-disk cached value in memory.
|
||||||
|
|
|
@ -713,7 +713,7 @@ where
|
||||||
Q::Key: DepNodeParams<CTX::DepContext>,
|
Q::Key: DepNodeParams<CTX::DepContext>,
|
||||||
CTX: QueryContext,
|
CTX: QueryContext,
|
||||||
{
|
{
|
||||||
debug_assert!(!Q::ANON);
|
assert!(!Q::ANON);
|
||||||
|
|
||||||
// We may be concurrently trying both execute and force a query.
|
// We may be concurrently trying both execute and force a query.
|
||||||
// Ensure that only one of them runs the query.
|
// Ensure that only one of them runs the query.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue