about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-01-19 11:19:36 +0100
committerGitHub <noreply@github.com>2023-01-19 11:19:36 +0100
commitdee88e0fa2a9225fa20222b694523a798d5c4c52 (patch)
tree41a10b7a6e61931b415f5b6055f8cab0be1c8199 /compiler/rustc_data_structures/src
parentd1c879f02eed283edab08f92b3f65b069556bba5 (diff)
parentb8c5821ad8bd4ae9da7b157d9189e2bc1bfe788e (diff)
downloadrust-dee88e0fa2a9225fa20222b694523a798d5c4c52.tar.gz
rust-dee88e0fa2a9225fa20222b694523a798d5c4c52.zip
Rollup merge of #107037 - tmiasko:rank, r=oli-obk
Fix Dominators::rank_partial_cmp to match documentation

The only use site is also updated accordingly and there is no change in end-to-end behaviour.
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/graph/dominators/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs
index 07b1ace2189..fb2a22e94a5 100644
--- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs
@@ -299,7 +299,7 @@ impl<Node: Idx> Dominators<Node> {
     /// of two unrelated nodes will also be consistent, but otherwise the order has no
     /// meaning.) This method cannot be used to determine if either Node dominates the other.
     pub fn rank_partial_cmp(&self, lhs: Node, rhs: Node) -> Option<Ordering> {
-        self.post_order_rank[lhs].partial_cmp(&self.post_order_rank[rhs])
+        self.post_order_rank[rhs].partial_cmp(&self.post_order_rank[lhs])
     }
 }