diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-01-18 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-01-18 17:11:43 +0100 |
| commit | b8c5821ad8bd4ae9da7b157d9189e2bc1bfe788e (patch) | |
| tree | d82ae8cae4baabe55a5ed4864dd1130faedc8968 /compiler/rustc_data_structures/src/graph | |
| parent | 1f72129ffe5e8c495113f9a2d4e1730f7fad3209 (diff) | |
| download | rust-b8c5821ad8bd4ae9da7b157d9189e2bc1bfe788e.tar.gz rust-b8c5821ad8bd4ae9da7b157d9189e2bc1bfe788e.zip | |
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/graph')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/dominators/mod.rs | 2 |
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]) } } |
