about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph/iterate
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2025-01-07 15:19:05 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2025-01-11 11:34:01 +0000
commita13354bea05968799a5be5521691322274fa6a9e (patch)
treee8e27ef15e991c493c152623adefa78ec0f64eab /compiler/rustc_data_structures/src/graph/iterate
parent7e4077d06fc073442c567d58885b47ed2c5121b8 (diff)
downloadrust-a13354bea05968799a5be5521691322274fa6a9e.tar.gz
rust-a13354bea05968799a5be5521691322274fa6a9e.zip
rename `BitSet` to `DenseBitSet`
This should make it clearer that this bitset is dense, with the
advantages and disadvantages that it entails.
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/iterate')
-rw-r--r--compiler/rustc_data_structures/src/graph/iterate/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_data_structures/src/graph/iterate/mod.rs b/compiler/rustc_data_structures/src/graph/iterate/mod.rs
index cbc6664d853..ecda7d3fba8 100644
--- a/compiler/rustc_data_structures/src/graph/iterate/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/iterate/mod.rs
@@ -1,6 +1,6 @@
 use std::ops::ControlFlow;
 
-use rustc_index::bit_set::BitSet;
+use rustc_index::bit_set::DenseBitSet;
 use rustc_index::{IndexSlice, IndexVec};
 
 use super::{DirectedGraph, StartNode, Successors};
@@ -78,7 +78,7 @@ where
 {
     graph: G,
     stack: Vec<G::Node>,
-    visited: BitSet<G::Node>,
+    visited: DenseBitSet<G::Node>,
 }
 
 impl<G> DepthFirstSearch<G>
@@ -86,7 +86,7 @@ where
     G: DirectedGraph + Successors,
 {
     pub fn new(graph: G) -> Self {
-        Self { stack: vec![], visited: BitSet::new_empty(graph.num_nodes()), graph }
+        Self { stack: vec![], visited: DenseBitSet::new_empty(graph.num_nodes()), graph }
     }
 
     /// Version of `push_start_node` that is convenient for chained
@@ -207,8 +207,8 @@ where
 {
     graph: &'graph G,
     stack: Vec<Event<G::Node>>,
-    visited: BitSet<G::Node>,
-    settled: BitSet<G::Node>,
+    visited: DenseBitSet<G::Node>,
+    settled: DenseBitSet<G::Node>,
 }
 
 impl<'graph, G> TriColorDepthFirstSearch<'graph, G>
@@ -219,8 +219,8 @@ where
         TriColorDepthFirstSearch {
             graph,
             stack: vec![],
-            visited: BitSet::new_empty(graph.num_nodes()),
-            settled: BitSet::new_empty(graph.num_nodes()),
+            visited: DenseBitSet::new_empty(graph.num_nodes()),
+            settled: DenseBitSet::new_empty(graph.num_nodes()),
         }
     }