about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph/vec_graph
diff options
context:
space:
mode:
authorpierwill <pierwill@users.noreply.github.com>2021-10-30 10:11:50 -0500
committerpierwill <pierwill@users.noreply.github.com>2021-12-22 10:50:57 -0600
commit8df92485919ac660273ec8dfef61d7ebb0b67a86 (patch)
tree16e5160a3d450ffa9d16eff61383ebc96f7d2dbb /compiler/rustc_data_structures/src/graph/vec_graph
parente100ec5bc7cd768ec17d75448b29c9ab4a39272b (diff)
downloadrust-8df92485919ac660273ec8dfef61d7ebb0b67a86.tar.gz
rust-8df92485919ac660273ec8dfef61d7ebb0b67a86.zip
Remove `PartialOrd` and `Ord` from `LocalDefId`
Implement `Ord`, `PartialOrd` for SpanData
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/vec_graph')
-rw-r--r--compiler/rustc_data_structures/src/graph/vec_graph/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
index 5d9bc1b2e51..826d0fe9ab4 100644
--- a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
@@ -20,7 +20,7 @@ pub struct VecGraph<N: Idx> {
 impl<N: Idx> VecGraph<N> {
     pub fn new(num_nodes: usize, mut edge_pairs: Vec<(N, N)>) -> Self {
         // Sort the edges by the source -- this is important.
-        edge_pairs.sort();
+        edge_pairs.sort_by_key(|&edge_pairs| (edge_pairs.0.index(), edge_pairs.1.index()));
 
         let num_edges = edge_pairs.len();