diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-08 09:23:40 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-01-08 09:23:40 +0100 |
| commit | 2d180714e14b34e36bf883bdf706ebaf5fa96754 (patch) | |
| tree | 36b4829675d832d323283fc37457f6509f8a519c /compiler/rustc_data_structures/src/graph/implementation | |
| parent | fc4a52f598f6259a98964aa3290e9e74e396c1e3 (diff) | |
| parent | 67f49010adf4ec3238564ec072b3652179813dd1 (diff) | |
| download | rust-2d180714e14b34e36bf883bdf706ebaf5fa96754.tar.gz rust-2d180714e14b34e36bf883bdf706ebaf5fa96754.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/implementation')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/implementation/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/graph/implementation/mod.rs b/compiler/rustc_data_structures/src/graph/implementation/mod.rs index 43fdfe6ee0d..7724e9347d8 100644 --- a/compiler/rustc_data_structures/src/graph/implementation/mod.rs +++ b/compiler/rustc_data_structures/src/graph/implementation/mod.rs @@ -22,7 +22,7 @@ use std::fmt::Debug; -use rustc_index::bit_set::BitSet; +use rustc_index::bit_set::DenseBitSet; use tracing::debug; #[cfg(test)] @@ -214,7 +214,7 @@ impl<N: Debug, E: Debug> Graph<N, E> { direction: Direction, entry_node: NodeIndex, ) -> Vec<NodeIndex> { - let mut visited = BitSet::new_empty(self.len_nodes()); + let mut visited = DenseBitSet::new_empty(self.len_nodes()); let mut stack = vec![]; let mut result = Vec::with_capacity(self.len_nodes()); let mut push_node = |stack: &mut Vec<_>, node: NodeIndex| { @@ -287,7 +287,7 @@ impl<'g, N: Debug, E: Debug> Iterator for AdjacentEdges<'g, N, E> { pub struct DepthFirstTraversal<'g, N, E> { graph: &'g Graph<N, E>, stack: Vec<NodeIndex>, - visited: BitSet<usize>, + visited: DenseBitSet<usize>, direction: Direction, } @@ -297,7 +297,7 @@ impl<'g, N: Debug, E: Debug> DepthFirstTraversal<'g, N, E> { start_node: NodeIndex, direction: Direction, ) -> Self { - let mut visited = BitSet::new_empty(graph.len_nodes()); + let mut visited = DenseBitSet::new_empty(graph.len_nodes()); visited.insert(start_node.node_id()); DepthFirstTraversal { graph, stack: vec![start_node], visited, direction } } |
