diff options
| author | Laurențiu Nicola <lnicola@users.noreply.github.com> | 2025-01-20 09:29:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-20 09:29:00 +0000 |
| commit | 141e53b7154083afcfb2e0fb0334e554d0c146a4 (patch) | |
| tree | 1707172316fef25a86219934940bf7d3196d263f /compiler/rustc_data_structures/src/graph/implementation | |
| parent | 61af2cc09a25a51015ed1c0e3ff9ce3dc8323987 (diff) | |
| parent | 3af5c080e61a00986852fc12ff2681238eaaa2dc (diff) | |
| download | rust-141e53b7154083afcfb2e0fb0334e554d0c146a4.tar.gz rust-141e53b7154083afcfb2e0fb0334e554d0c146a4.zip | |
Merge pull request #18980 from lnicola/sync-from-rust
minor: Sync from downstream
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 } } |
