From 955e7fbb16e5015a493427dd2ab54aef97f2e23d Mon Sep 17 00:00:00 2001 From: Tomasz Miąsko Date: Fri, 20 Jan 2023 00:00:00 +0000 Subject: Consistently use dominates instead of is_dominated_by There is a number of APIs that answer dominance queries. Previously they were named either "dominates" or "is_dominated_by". Consistently use the "dominates" form. No functional changes. --- compiler/rustc_data_structures/src/graph/dominators/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src/graph') diff --git a/compiler/rustc_data_structures/src/graph/dominators/mod.rs b/compiler/rustc_data_structures/src/graph/dominators/mod.rs index fb2a22e94a5..6398e8360c0 100644 --- a/compiler/rustc_data_structures/src/graph/dominators/mod.rs +++ b/compiler/rustc_data_structures/src/graph/dominators/mod.rs @@ -289,7 +289,7 @@ impl Dominators { Iter { dominators: self, node: Some(node) } } - pub fn is_dominated_by(&self, node: Node, dom: Node) -> bool { + pub fn dominates(&self, dom: Node, node: Node) -> bool { // FIXME -- could be optimized by using post-order-rank self.dominators(node).any(|n| n == dom) } -- cgit 1.4.1-3-g733a5