Remove Hir and HirBody dep nodes

This commit is contained in:
John Kåre Alsaker 2020-02-08 05:30:45 +01:00
parent e9d166fac5
commit b97d4383a4
7 changed files with 5 additions and 15 deletions

View file

@ -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),

View file

@ -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,

View file

@ -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)>,
}

View file

@ -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());

View file

@ -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 |

View file

@ -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(()) => {

View file

@ -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