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`.
This commit is contained in:
parent
c401f09979
commit
64b6b5b6ce
40 changed files with 862 additions and 867 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue