diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-02-08 05:30:45 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-03-14 22:52:30 +0100 |
| commit | b97d4383a4e82b084e9044ea47bad39fbfb91649 (patch) | |
| tree | 209c1e32c3453516bbf7ae1b4ad9d3b1b1647239 /src | |
| parent | e9d166fac54dc3944e293121c732ff709acfd9e3 (diff) | |
| download | rust-b97d4383a4e82b084e9044ea47bad39fbfb91649.tar.gz rust-b97d4383a4e82b084e9044ea47bad39fbfb91649.zip | |
Remove `Hir` and `HirBody` dep nodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/dep_graph/dep_node.rs | 7 | ||||
| -rw-r--r-- | src/librustc/dep_graph/graph.rs | 2 | ||||
| -rw-r--r-- | src/librustc/hir/map/collector.rs | 2 | ||||
| -rw-r--r-- | src/librustc/hir/map/hir_id_validator.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/query/mod.rs | 2 | ||||
| -rw-r--r-- | src/librustc_incremental/assert_dep_graph.rs | 2 | ||||
| -rw-r--r-- | src/librustc_incremental/persist/dirty_clean.rs | 3 |
7 files changed, 5 insertions, 15 deletions
diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index 36b5f4de099..e3df9d5d04b 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -341,13 +341,6 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx> // We use this for most things when incr. comp. is turned off. [] Null, - // Represents the body of a function or method. The def-id is that of the - // function/method. - [eval_always] HirBody(DefId), - - // Represents the HIR node with the given node-id - [eval_always] Hir(DefId), - // Represents metadata from an extern crate. [eval_always] CrateMetadata(CrateNum), diff --git a/src/librustc/dep_graph/graph.rs b/src/librustc/dep_graph/graph.rs index a2dc1fdb34b..f5d68e8074d 100644 --- a/src/librustc/dep_graph/graph.rs +++ b/src/librustc/dep_graph/graph.rs @@ -677,7 +677,7 @@ impl DepGraph { } } else { match dep_dep_node.kind { - DepKind::Hir | DepKind::HirBody | DepKind::CrateMetadata => { + DepKind::CrateMetadata => { if let Some(def_id) = dep_dep_node.extract_def_id(tcx) { if def_id_corresponds_to_hir_dep_node(tcx, def_id) { // The `DefPath` has corresponding node, diff --git a/src/librustc/hir/map/collector.rs b/src/librustc/hir/map/collector.rs index b9ab43ed289..ee5192f58c2 100644 --- a/src/librustc/hir/map/collector.rs +++ b/src/librustc/hir/map/collector.rs @@ -44,7 +44,7 @@ pub(super) struct NodeCollector<'a, 'hir> { hcx: StableHashingContext<'a>, - // We are collecting `DepNode::HirBody` hashes here so we can compute the + // We are collecting HIR hashes here so we can compute the // crate hash from them later on. hir_body_nodes: Vec<(DefPathHash, Fingerprint)>, } diff --git a/src/librustc/hir/map/hir_id_validator.rs b/src/librustc/hir/map/hir_id_validator.rs index 0c6415a1308..6792c00e763 100644 --- a/src/librustc/hir/map/hir_id_validator.rs +++ b/src/librustc/hir/map/hir_id_validator.rs @@ -7,7 +7,7 @@ use rustc_hir::intravisit; use rustc_hir::itemlikevisit::ItemLikeVisitor; use rustc_hir::{HirId, ItemLocalId};*/ -pub fn check_crate(hir_map: &EarlyMap<'_>, sess: &rustc_session::Session) { +pub fn check_crate(_: &EarlyMap<'_>, sess: &rustc_session::Session) { /*hir_map.dep_graph.assert_ignored(); let errors = Lock::new(Vec::new()); diff --git a/src/librustc/ty/query/mod.rs b/src/librustc/ty/query/mod.rs index d1141a48990..3d17883fec3 100644 --- a/src/librustc/ty/query/mod.rs +++ b/src/librustc/ty/query/mod.rs @@ -180,8 +180,6 @@ pub fn force_from_dep_node<'tcx>(tcx: TyCtxt<'tcx>, dep_node: &DepNode) -> bool // These are inputs that are expected to be pre-allocated and that // should therefore always be red or green already. DepKind::CrateMetadata | - DepKind::HirBody | - DepKind::Hir | // These are anonymous nodes. DepKind::TraitSelect | diff --git a/src/librustc_incremental/assert_dep_graph.rs b/src/librustc_incremental/assert_dep_graph.rs index 7686a507ff5..7ddb29c3cb6 100644 --- a/src/librustc_incremental/assert_dep_graph.rs +++ b/src/librustc_incremental/assert_dep_graph.rs @@ -120,7 +120,7 @@ impl IfThisChanged<'tcx> { if attr.check_name(sym::rustc_if_this_changed) { let dep_node_interned = self.argument(attr); let dep_node = match dep_node_interned { - None => DepNode::from_def_path_hash(def_path_hash, DepKind::Hir), + None => DepNode::from_def_path_hash(def_path_hash, DepKind::hir_owner), Some(n) => match DepNode::from_label_string(&n.as_str(), def_path_hash) { Ok(n) => n, Err(()) => { diff --git a/src/librustc_incremental/persist/dirty_clean.rs b/src/librustc_incremental/persist/dirty_clean.rs index c90b5abfe30..bb77309d32b 100644 --- a/src/librustc_incremental/persist/dirty_clean.rs +++ b/src/librustc_incremental/persist/dirty_clean.rs @@ -54,8 +54,7 @@ const BASE_FN: &[&str] = &[ /// DepNodes for Hir, which is pretty much everything const BASE_HIR: &[&str] = &[ // Hir and HirBody should be computed for all nodes - label_strs::Hir, - label_strs::HirBody, + "Hir", "HirBody", ]; /// `impl` implementation of struct/trait |
