about summary refs log tree commit diff
path: root/compiler/rustc_incremental
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-01-25 19:16:38 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2024-01-30 15:00:52 +0300
commit64b6b5b6ce078684dea0d312e3ac0911e1d6a0df (patch)
tree0855baa9a6a74ccced8920fea0c6bf01bb0c68b8 /compiler/rustc_incremental
parentc401f099795231fca8adf6619d76ccdcfbbfd2f9 (diff)
downloadrust-64b6b5b6ce078684dea0d312e3ac0911e1d6a0df.tar.gz
rust-64b6b5b6ce078684dea0d312e3ac0911e1d6a0df.zip
hir: Simplify `hir_owner_nodes` query
The query accept arbitrary DefIds, not just owner DefIds.
The return can be an `Option` because if there are no nodes, then it doesn't matter whether it's due to NonOwner or Phantom.
Also rename the query to `opt_hir_owner_nodes`.
Diffstat (limited to 'compiler/rustc_incremental')
-rw-r--r--compiler/rustc_incremental/src/assert_dep_graph.rs2
-rw-r--r--compiler/rustc_incremental/src/persist/dirty_clean.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_incremental/src/assert_dep_graph.rs b/compiler/rustc_incremental/src/assert_dep_graph.rs
index 6f909a0cc9d..aa6f184a2d7 100644
--- a/compiler/rustc_incremental/src/assert_dep_graph.rs
+++ b/compiler/rustc_incremental/src/assert_dep_graph.rs
@@ -131,7 +131,7 @@ impl<'tcx> IfThisChanged<'tcx> {
                     None => DepNode::from_def_path_hash(
                         self.tcx,
                         def_path_hash,
-                        dep_kinds::hir_owner_nodes,
+                        dep_kinds::opt_hir_owner_nodes,
                     ),
                     Some(n) => {
                         match DepNode::from_label_string(self.tcx, n.as_str(), def_path_hash) {
diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs
index 842cc9fae9b..14cc8c260e2 100644
--- a/compiler/rustc_incremental/src/persist/dirty_clean.rs
+++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs
@@ -57,8 +57,8 @@ const BASE_FN: &[&str] = &[
 
 /// DepNodes for Hir, which is pretty much everything
 const BASE_HIR: &[&str] = &[
-    // hir_owner_nodes should be computed for all nodes
-    label_strs::hir_owner_nodes,
+    // opt_hir_owner_nodes should be computed for all nodes
+    label_strs::opt_hir_owner_nodes,
 ];
 
 /// `impl` implementation of struct/trait