Skip to content

Commit d948af1

Browse files
incr.comp.: Remove unused DepKind::WorkProduct.
1 parent 702ce8f commit d948af1

File tree

3 files changed

+3
-27
lines changed

3 files changed

+3
-27
lines changed

src/librustc/dep_graph/dep_node.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,6 @@ define_dep_nodes!( <'tcx>
459459
// Represents metadata from an extern crate.
460460
[input] CrateMetadata(CrateNum),
461461

462-
// Represents some artifact that we save to disk. Note that these
463-
// do not have a def-id as part of their identifier.
464-
[] WorkProduct(WorkProductId),
465-
466462
// Represents different phases in the compiler.
467463
[] RegionScopeTree(DefId),
468464
[eval_always] Coherence,
@@ -781,13 +777,6 @@ impl WorkProductId {
781777
hash: fingerprint
782778
}
783779
}
784-
785-
pub fn to_dep_node(self) -> DepNode {
786-
DepNode {
787-
kind: DepKind::WorkProduct,
788-
hash: self.hash,
789-
}
790-
}
791780
}
792781

793782
impl_stable_hash_for!(struct ::dep_graph::WorkProductId {

src/librustc/ty/maps/plumbing.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,8 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
721721
DepKind::EraseRegionsTy |
722722
DepKind::NormalizeTy |
723723

724-
// These are just odd
725-
DepKind::Null |
726-
DepKind::WorkProduct => {
724+
// This one should never occur in this context
725+
DepKind::Null => {
727726
bug!("force_from_dep_node() - Encountered {:?}", dep_node.kind)
728727
}
729728

src/librustc_trans/partitioning.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
105105
use collector::InliningMap;
106106
use common;
107-
use rustc::dep_graph::{DepNode, WorkProductId};
107+
use rustc::dep_graph::WorkProductId;
108108
use rustc::hir::def_id::DefId;
109109
use rustc::hir::map::DefPathData;
110110
use rustc::middle::trans::{Linkage, Visibility};
@@ -147,10 +147,6 @@ pub trait CodegenUnitExt<'tcx> {
147147
WorkProductId::from_cgu_name(self.name())
148148
}
149149

150-
fn work_product_dep_node(&self) -> DepNode {
151-
self.work_product_id().to_dep_node()
152-
}
153-
154150
fn items_in_deterministic_order<'a>(&self,
155151
tcx: TyCtxt<'a, 'tcx, 'tcx>)
156152
-> Vec<(TransItem<'tcx>,
@@ -253,14 +249,6 @@ pub fn partition<'a, 'tcx, I>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
253249
cgu1.name().cmp(cgu2.name())
254250
});
255251

256-
if tcx.sess.opts.enable_dep_node_debug_strs() {
257-
for cgu in &result {
258-
let dep_node = cgu.work_product_dep_node();
259-
tcx.dep_graph.register_dep_node_debug_str(dep_node,
260-
|| cgu.name().to_string());
261-
}
262-
}
263-
264252
result
265253
}
266254

0 commit comments

Comments
 (0)