From 8df92485919ac660273ec8dfef61d7ebb0b67a86 Mon Sep 17 00:00:00 2001 From: pierwill Date: Sat, 30 Oct 2021 10:11:50 -0500 Subject: Remove `PartialOrd` and `Ord` from `LocalDefId` Implement `Ord`, `PartialOrd` for SpanData --- compiler/rustc_data_structures/src/graph/vec_graph/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src') 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 { impl VecGraph { 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(); -- cgit 1.4.1-3-g733a5