Skip to content

Commit 81fc1bd

Browse files
committed
Remove Hir and HirBody dep nodes
1 parent 7c9a5eb commit 81fc1bd

File tree

7 files changed

+5
-15
lines changed

7 files changed

+5
-15
lines changed

src/librustc/dep_graph/dep_node.rs

-7
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
394394
// We use this for most things when incr. comp. is turned off.
395395
[] Null,
396396

397-
// Represents the body of a function or method. The def-id is that of the
398-
// function/method.
399-
[eval_always] HirBody(DefId),
400-
401-
// Represents the HIR node with the given node-id
402-
[eval_always] Hir(DefId),
403-
404397
// Represents metadata from an extern crate.
405398
[eval_always] CrateMetadata(CrateNum),
406399

src/librustc/dep_graph/graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ impl DepGraph {
677677
}
678678
} else {
679679
match dep_dep_node.kind {
680-
DepKind::Hir | DepKind::HirBody | DepKind::CrateMetadata => {
680+
DepKind::CrateMetadata => {
681681
if let Some(def_id) = dep_dep_node.extract_def_id(tcx) {
682682
if def_id_corresponds_to_hir_dep_node(tcx, def_id) {
683683
// The `DefPath` has corresponding node,

src/librustc/hir/map/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub(super) struct NodeCollector<'a, 'hir> {
4444

4545
hcx: StableHashingContext<'a>,
4646

47-
// We are collecting `DepNode::HirBody` hashes here so we can compute the
47+
// We are collecting HIR hashes here so we can compute the
4848
// crate hash from them later on.
4949
hir_body_nodes: Vec<(DefPathHash, Fingerprint)>,
5050
}

src/librustc/hir/map/hir_id_validator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_hir::intravisit;
77
use rustc_hir::itemlikevisit::ItemLikeVisitor;
88
use rustc_hir::{HirId, ItemLocalId};*/
99

10-
pub fn check_crate(hir_map: &EarlyMap<'_>) {
10+
pub fn check_crate(_: &EarlyMap<'_>) {
1111
/*hir_map.dep_graph.assert_ignored();
1212
1313
let errors = Lock::new(Vec::new());

src/librustc/ty/query/plumbing.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1177,8 +1177,6 @@ pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
11771177
// These are inputs that are expected to be pre-allocated and that
11781178
// should therefore always be red or green already.
11791179
DepKind::CrateMetadata |
1180-
DepKind::HirBody |
1181-
DepKind::Hir |
11821180

11831181
// These are anonymous nodes.
11841182
DepKind::TraitSelect |

src/librustc_incremental/assert_dep_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl IfThisChanged<'tcx> {
120120
if attr.check_name(sym::rustc_if_this_changed) {
121121
let dep_node_interned = self.argument(attr);
122122
let dep_node = match dep_node_interned {
123-
None => DepNode::from_def_path_hash(def_path_hash, DepKind::Hir),
123+
None => DepNode::from_def_path_hash(def_path_hash, DepKind::hir_owner),
124124
Some(n) => match DepNode::from_label_string(&n.as_str(), def_path_hash) {
125125
Ok(n) => n,
126126
Err(()) => {

src/librustc_incremental/persist/dirty_clean.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ const BASE_FN: &[&str] = &[
5454
/// DepNodes for Hir, which is pretty much everything
5555
const BASE_HIR: &[&str] = &[
5656
// Hir and HirBody should be computed for all nodes
57-
label_strs::Hir,
58-
label_strs::HirBody,
57+
"Hir", "HirBody",
5958
];
6059

6160
/// `impl` implementation of struct/trait

0 commit comments

Comments
 (0)