Skip to content

Commit 338fad2

Browse files
committed
Remove unused code from rustc_query_system
1 parent 9ed2177 commit 338fad2

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

compiler/rustc_query_system/src/dep_graph/dep_node.rs

-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ impl WorkProductId {
165165
cgu_name.hash(&mut hasher);
166166
WorkProductId { hash: hasher.finish() }
167167
}
168-
169-
pub fn from_fingerprint(fingerprint: Fingerprint) -> WorkProductId {
170-
WorkProductId { hash: fingerprint }
171-
}
172168
}
173169

174170
impl<HCX> HashStable<HCX> for WorkProductId {

compiler/rustc_query_system/src/dep_graph/graph.rs

-5
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,6 @@ impl<K: DepKind> DepGraph<K> {
402402
self.data.as_ref().unwrap().previous.fingerprint_of(dep_node)
403403
}
404404

405-
#[inline]
406-
pub fn prev_dep_node_index_of(&self, dep_node: &DepNode<K>) -> SerializedDepNodeIndex {
407-
self.data.as_ref().unwrap().previous.node_to_index(dep_node)
408-
}
409-
410405
/// Checks whether a previous work product exists for `v` and, if
411406
/// so, return the path that leads to it. Used to skip doing work.
412407
pub fn previous_work_product(&self, v: &WorkProductId) -> Option<WorkProduct> {

compiler/rustc_query_system/src/dep_graph/query.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use rustc_data_structures::fx::FxHashMap;
2-
use rustc_data_structures::graph::implementation::{
3-
Direction, Graph, NodeIndex, INCOMING, OUTGOING,
4-
};
2+
use rustc_data_structures::graph::implementation::{Direction, Graph, NodeIndex, INCOMING};
53

64
use super::{DepKind, DepNode};
75

@@ -52,23 +50,8 @@ impl<K: DepKind> DepGraphQuery<K> {
5250
}
5351
}
5452

55-
/// All nodes reachable from `node`. In other words, things that
56-
/// will have to be recomputed if `node` changes.
57-
pub fn transitive_successors(&self, node: &DepNode<K>) -> Vec<&DepNode<K>> {
58-
self.reachable_nodes(node, OUTGOING)
59-
}
60-
6153
/// All nodes that can reach `node`.
6254
pub fn transitive_predecessors(&self, node: &DepNode<K>) -> Vec<&DepNode<K>> {
6355
self.reachable_nodes(node, INCOMING)
6456
}
65-
66-
/// Just the outgoing edges from `node`.
67-
pub fn immediate_successors(&self, node: &DepNode<K>) -> Vec<&DepNode<K>> {
68-
if let Some(&index) = self.indices.get(&node) {
69-
self.graph.successor_nodes(index).map(|s| self.graph.node_data(s)).collect()
70-
} else {
71-
vec![]
72-
}
73-
}
7457
}

0 commit comments

Comments
 (0)