Skip to content

Commit

Permalink
Address review.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Oct 20, 2021
1 parent 8785b70 commit b11ec29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions compiler/rustc_middle/src/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_system/src/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b11ec29

Please sign in to comment.