@@ -50,7 +50,7 @@ rustc_index::newtype_index! {
50
50
rustc_data_structures:: static_assert_size!( Option <DepNodeIndex >, 4 ) ;
51
51
52
52
impl DepNodeIndex {
53
- const SINGLETON_DEPENDENCYLESS_ANON_NODE : DepNodeIndex = DepNodeIndex :: ZERO ;
53
+ const SINGLETON_ZERO_DEPS_ANON_NODE : DepNodeIndex = DepNodeIndex :: ZERO ;
54
54
pub const FOREVER_RED_NODE : DepNodeIndex = DepNodeIndex :: from_u32 ( 1 ) ;
55
55
}
56
56
@@ -140,13 +140,13 @@ impl<D: Deps> DepGraph<D> {
140
140
141
141
let colors = DepNodeColorMap :: new ( prev_graph_node_count) ;
142
142
143
- // Instantiate a dependy-less node only once for anonymous queries.
143
+ // Instantiate a node with zero dependencies only once for anonymous queries.
144
144
let _green_node_index = current. alloc_node (
145
- DepNode { kind : D :: DEP_KIND_NULL , hash : current. anon_id_seed . into ( ) } ,
145
+ DepNode { kind : D :: DEP_KIND_ANON_ZERO_DEPS , hash : current. anon_id_seed . into ( ) } ,
146
146
EdgesVec :: new ( ) ,
147
147
Fingerprint :: ZERO ,
148
148
) ;
149
- assert_eq ! ( _green_node_index, DepNodeIndex :: SINGLETON_DEPENDENCYLESS_ANON_NODE ) ;
149
+ assert_eq ! ( _green_node_index, DepNodeIndex :: SINGLETON_ZERO_DEPS_ANON_NODE ) ;
150
150
151
151
// Instantiate a dependy-less red node only once for anonymous queries.
152
152
let red_node_index = current. alloc_node (
@@ -407,7 +407,7 @@ impl<D: Deps> DepGraphData<D> {
407
407
// going to be (i.e. equal to the precomputed
408
408
// `SINGLETON_DEPENDENCYLESS_ANON_NODE`). As a consequence we can skip creating
409
409
// a `StableHasher` and sending the node through interning.
410
- DepNodeIndex :: SINGLETON_DEPENDENCYLESS_ANON_NODE
410
+ DepNodeIndex :: SINGLETON_ZERO_DEPS_ANON_NODE
411
411
}
412
412
1 => {
413
413
// When there is only one dependency, don't bother creating a node.
0 commit comments