summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-11-20 05:15:06 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-12-04 08:51:13 -0500
commitfb4b06ab3b6ef6f621bd937c548168bddb9d442e (patch)
treebf4f88bc23e04405de0416841eff3842e7ce3d05 /src/librustc_data_structures
parent45f60271960c7a56a7d455366ec41a1e423d61a2 (diff)
downloadrust-fb4b06ab3b6ef6f621bd937c548168bddb9d442e.tar.gz
rust-fb4b06ab3b6ef6f621bd937c548168bddb9d442e.zip
rename `greater_than` to `reachable_from`
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/transitive_relation.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_data_structures/transitive_relation.rs b/src/librustc_data_structures/transitive_relation.rs
index 933e08811ce..2419edf5ddc 100644
--- a/src/librustc_data_structures/transitive_relation.rs
+++ b/src/librustc_data_structures/transitive_relation.rs
@@ -134,12 +134,13 @@ impl<T: Clone + Debug + Eq + Hash + Clone> TransitiveRelation<T> {
         }
     }
 
-    /// Returns a vector of all things greater than `a`.
+    /// Thinking of `x R y` as an edge `x -> y` in a graph, this
+    /// returns all things reachable from `a`.
     ///
     /// Really this probably ought to be `impl Iterator<Item=&T>`, but
     /// I'm too lazy to make that work, and -- given the caching
     /// strategy -- it'd be a touch tricky anyhow.
-    pub fn greater_than(&self, a: &T) -> Vec<&T> {
+    pub fn reachable_from(&self, a: &T) -> Vec<&T> {
         match self.index(a) {
             Some(a) => self.with_closure(|closure| {
                 closure.iter(a.0).map(|i| &self.elements[i]).collect()