Address review.

This commit is contained in:
Camille GILLOT 2021-10-19 19:17:33 +02:00
parent 8785b70774
commit b11ec29e28
2 changed files with 1 additions and 8 deletions

View File

@ -124,13 +124,6 @@ pub struct DepKindStruct {
/// with kind `MirValidated`, we know that the GUID/fingerprint of the `DepNode`
/// is actually a `DefPathHash`, and can therefore just look up the corresponding
/// `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>,
/// Invoke a query to put the on-disk cached value in memory.

View File

@ -713,7 +713,7 @@ where
Q::Key: DepNodeParams<CTX::DepContext>,
CTX: QueryContext,
{
debug_assert!(!Q::ANON);
assert!(!Q::ANON);
// We may be concurrently trying both execute and force a query.
// Ensure that only one of them runs the query.