diff options
| author | bors <bors@rust-lang.org> | 2023-09-19 00:02:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-19 00:02:42 +0000 |
| commit | f3984ce5bbd5b6ab99279617ad1b84dec7a3dd20 (patch) | |
| tree | 20ea25e480deedd30611b34c1dc9a72d017aa4c2 /compiler/rustc_data_structures/src | |
| parent | 65ea825f4021eaf77f1b25139969712d65b435a4 (diff) | |
| parent | aa55d7d7301ebe569c7a2369b99bd84cd880aee4 (diff) | |
| download | rust-f3984ce5bbd5b6ab99279617ad1b84dec7a3dd20.tar.gz rust-f3984ce5bbd5b6ab99279617ad1b84dec7a3dd20.zip | |
Auto merge of #115952 - matthiaskrgr:rollup-qzk8t4e, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #115869 (Avoid blessing cargo deps's source code in ui tests) - #115873 (Make `TyKind::Adt`'s `Debug` impl be more pretty) - #115879 (Migrate diagnostics in `hir_typeck/src/cast.rs`) - #115930 (coverage: Fix an unstable-sort inconsistency in coverage spans) - #115931 (Move mobile topbar title creation entirely into JS) - #115941 (Add myself to .mailmap) - #115943 (compiletest: Don't swallow some error messages.) - #115949 (Update browser-ui-test version) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/dominators/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs index 85ef2de9b5e..4075481e561 100644 --- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs +++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs @@ -51,7 +51,7 @@ pub fn dominators<G: ControlFlowGraph>(graph: &G) -> Dominators<G::Node> { // Traverse the graph, collecting a number of things: // // * Preorder mapping (to it, and back to the actual ordering) - // * Postorder mapping (used exclusively for rank_partial_cmp on the final product) + // * Postorder mapping (used exclusively for `cmp_in_dominator_order` on the final product) // * Parents for each vertex in the preorder tree // // These are all done here rather than through one of the 'standard' @@ -342,8 +342,8 @@ impl<Node: Idx> Dominators<Node> { /// relationship, the dominator will always precede the dominated. (The relative ordering /// 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[rhs].partial_cmp(&self.post_order_rank[lhs]) + pub fn cmp_in_dominator_order(&self, lhs: Node, rhs: Node) -> Ordering { + self.post_order_rank[rhs].cmp(&self.post_order_rank[lhs]) } /// Returns true if `a` dominates `b`. |
