Skip to content

Commit 1630c79

Browse files
committed
rename best_upper_bound to postdom_upper_bound
1 parent a54b91f commit 1630c79

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/librustc/middle/free_region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl FreeRegionMap {
104104
let r_a = ty::ReFree(fr_a);
105105
let r_b = ty::ReFree(fr_b);
106106
let result = if fr_a == fr_b { r_a } else {
107-
match self.relation.best_upper_bound(&r_a, &r_b) {
107+
match self.relation.postdom_upper_bound(&r_a, &r_b) {
108108
None => ty::ReStatic,
109109
Some(r) => *r,
110110
}

src/librustc_data_structures/transitive_relation.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<T:Debug+PartialEq> TransitiveRelation<T> {
107107
///
108108
/// Examples are probably clearer than any prose I could write
109109
/// (there are corresponding tests below, btw). In each case,
110-
/// the query is `best_upper_bound(a, b)`:
110+
/// the query is `postdom_upper_bound(a, b)`:
111111
///
112112
/// ```
113113
/// // returns Some(x), which is also LUB
@@ -127,7 +127,7 @@ impl<T:Debug+PartialEq> TransitiveRelation<T> {
127127
/// a -> a1
128128
/// b -> b1
129129
/// ```
130-
pub fn best_upper_bound(&self, a: &T, b: &T) -> Option<&T> {
130+
pub fn postdom_upper_bound(&self, a: &T, b: &T) -> Option<&T> {
131131
let mut mubs = self.minimal_upper_bounds(a, b);
132132
loop {
133133
match mubs.len() {
@@ -422,7 +422,7 @@ fn mubs_best_choice_scc() {
422422
}
423423

424424
#[test]
425-
fn bub_crisscross() {
425+
fn pdub_crisscross() {
426426
// diagonal edges run left-to-right
427427
// a -> a1 -> x
428428
// \/ ^
@@ -438,11 +438,11 @@ fn bub_crisscross() {
438438
relation.add("b1", "x");
439439

440440
assert_eq!(relation.minimal_upper_bounds(&"a", &"b"), vec![&"a1", &"b1"]);
441-
assert_eq!(relation.best_upper_bound(&"a", &"b"), Some(&"x"));
441+
assert_eq!(relation.postdom_upper_bound(&"a", &"b"), Some(&"x"));
442442
}
443443

444444
#[test]
445-
fn bub_crisscross_more() {
445+
fn pdub_crisscross_more() {
446446
// diagonal edges run left-to-right
447447
// a -> a1 -> a2 -> a3 -> x
448448
// \/ \/ ^
@@ -467,11 +467,11 @@ fn bub_crisscross_more() {
467467

468468
assert_eq!(relation.minimal_upper_bounds(&"a", &"b"), vec![&"a1", &"b1"]);
469469
assert_eq!(relation.minimal_upper_bounds(&"a1", &"b1"), vec![&"a2", &"b2"]);
470-
assert_eq!(relation.best_upper_bound(&"a", &"b"), Some(&"x"));
470+
assert_eq!(relation.postdom_upper_bound(&"a", &"b"), Some(&"x"));
471471
}
472472

473473
#[test]
474-
fn bub_lub() {
474+
fn pdub_lub() {
475475
// a -> a1 -> x
476476
// ^
477477
// |
@@ -484,7 +484,7 @@ fn bub_lub() {
484484
relation.add("b1", "x");
485485

486486
assert_eq!(relation.minimal_upper_bounds(&"a", &"b"), vec![&"x"]);
487-
assert_eq!(relation.best_upper_bound(&"a", &"b"), Some(&"x"));
487+
assert_eq!(relation.postdom_upper_bound(&"a", &"b"), Some(&"x"));
488488
}
489489

490490
#[test]

0 commit comments

Comments
 (0)