diff options
| author | bors <bors@rust-lang.org> | 2023-08-29 05:55:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-08-29 05:55:46 +0000 |
| commit | d9c11c65ee93b6dfd0c71f17812c68d316fce183 (patch) | |
| tree | 1451f2e711b883122df8c5f3f7baa19ef46a1c89 /compiler/rustc_data_structures | |
| parent | 63bf24090e38463bc2125170a0c3e98e0d20a85c (diff) | |
| parent | fb3565a848af21af18c26156f0acae9115257e46 (diff) | |
| download | rust-d9c11c65ee93b6dfd0c71f17812c68d316fce183.tar.gz rust-d9c11c65ee93b6dfd0c71f17812c68d316fce183.zip | |
Auto merge of #3042 - rust-lang:rustup-2023-08-29, r=RalfJung
Automatic sync from rustc
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/implementation/mod.rs | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/compiler/rustc_data_structures/src/graph/implementation/mod.rs b/compiler/rustc_data_structures/src/graph/implementation/mod.rs index 9ff401c3c7a..3910c6fa46d 100644 --- a/compiler/rustc_data_structures/src/graph/implementation/mod.rs +++ b/compiler/rustc_data_structures/src/graph/implementation/mod.rs @@ -20,7 +20,6 @@ //! the field `next_edge`). Each of those fields is an array that should //! be indexed by the direction (see the type `Direction`). -use crate::snapshot_vec::{SnapshotVec, SnapshotVecDelegate}; use rustc_index::bit_set::BitSet; use std::fmt::Debug; @@ -28,8 +27,8 @@ use std::fmt::Debug; mod tests; pub struct Graph<N, E> { - nodes: SnapshotVec<Node<N>>, - edges: SnapshotVec<Edge<E>>, + nodes: Vec<Node<N>>, + edges: Vec<Edge<E>>, } pub struct Node<N> { @@ -45,20 +44,6 @@ pub struct Edge<E> { pub data: E, } -impl<N> SnapshotVecDelegate for Node<N> { - type Value = Node<N>; - type Undo = (); - - fn reverse(_: &mut Vec<Node<N>>, _: ()) {} -} - -impl<N> SnapshotVecDelegate for Edge<N> { - type Value = Edge<N>; - type Undo = (); - - fn reverse(_: &mut Vec<Edge<N>>, _: ()) {} -} - #[derive(Copy, Clone, PartialEq, Debug)] pub struct NodeIndex(pub usize); @@ -86,11 +71,11 @@ impl NodeIndex { impl<N: Debug, E: Debug> Graph<N, E> { pub fn new() -> Graph<N, E> { - Graph { nodes: SnapshotVec::new(), edges: SnapshotVec::new() } + Graph { nodes: Vec::new(), edges: Vec::new() } } pub fn with_capacity(nodes: usize, edges: usize) -> Graph<N, E> { - Graph { nodes: SnapshotVec::with_capacity(nodes), edges: SnapshotVec::with_capacity(edges) } + Graph { nodes: Vec::with_capacity(nodes), edges: Vec::with_capacity(edges) } } // # Simple accessors |
