about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-28 19:57:32 +0000
committerbors <bors@rust-lang.org>2023-08-28 19:57:32 +0000
commit4e78abb437a0478d1f42115198ee45888e5330fd (patch)
treec501ade3f4be50072b2f1f360961c8534fad41a5 /compiler/rustc_data_structures/src
parent93dd62024113acb782812189d01e8e239da150e7 (diff)
parent07a32e2dbd99b831812c42c510be21c240b11562 (diff)
downloadrust-4e78abb437a0478d1f42115198ee45888e5330fd.tar.gz
rust-4e78abb437a0478d1f42115198ee45888e5330fd.zip
Auto merge of #115326 - matthiaskrgr:rollup-qsoa8ar, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #115164 (MIR validation: reject in-place argument/return for packed fields)
 - #115240 (codegen_llvm/llvm_type: avoid matching on the Rust type)
 - #115294 (More precisely detect cycle errors from type_of on opaque)
 - #115310 (Document panic behavior across editions, and improve xrefs)
 - #115311 (Revert "Suggest using `Arc` on `!Send`/`!Sync` types")
 - #115317 (Devacationize oli-obk)
 - #115319 (don't use SnapshotVec in Graph implementation, as it looks unused; use Vec instead)
 - #115322 (Tweak output of `to_pretty_impl_header` involving only anon lifetimes)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/graph/implementation/mod.rs23
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