diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-01-20 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2023-01-21 12:15:02 +0100 |
| commit | 955e7fbb16e5015a493427dd2ab54aef97f2e23d (patch) | |
| tree | b3d508747592213ad5b32a41196d65dd98be3ded /compiler/rustc_data_structures/src/graph | |
| parent | b22aa57fd54c240131c9a31b78213de9f3bee64b (diff) | |
| download | rust-955e7fbb16e5015a493427dd2ab54aef97f2e23d.tar.gz rust-955e7fbb16e5015a493427dd2ab54aef97f2e23d.zip | |
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.
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 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<Node: Idx> Dominators<Node> { 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) } |
