Skip to content

Commit a88ded2

Browse files
committed
---
yaml --- r: 15346 b: refs/heads/try c: 4856eab h: refs/heads/master v: v3
1 parent 16f5850 commit a88ded2

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 2c56ba7e4338b8c6c99c8f16cc96939ebd03f735
5+
refs/heads/try: 4856eab844913951f6288516fc89defa408297f2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/middle/infer.rs

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,10 @@ iface combine {
978978
fn c_regions_scope_scope(
979979
a: ty::region, a_id: ast::node_id,
980980
b: ty::region, b_id: ast::node_id) -> cres<ty::region>;
981+
fn c_regions_scope_free(
982+
a: ty::region, a_id: ast::node_id,
983+
b: ty::region, b_id: ast::node_id, b_br: ty::bound_region)
984+
-> cres<ty::region>;
981985
fn c_regions_free_scope(
982986
a: ty::region, a_id: ast::node_id, a_br: ty::bound_region,
983987
b: ty::region, b_id: ast::node_id) -> cres<ty::region>;
@@ -1327,9 +1331,12 @@ fn c_regions<C:combine>(
13271331
{|x, y| self.c_regions(x, y) })
13281332
}
13291333

1330-
(f @ ty::re_free(f_id, f_br), s @ ty::re_scope(s_id)) |
1331-
(s @ ty::re_scope(s_id), f @ ty::re_free(f_id, f_br)) {
1332-
self.c_regions_free_scope(f, f_id, f_br, s, s_id)
1334+
(ty::re_free(a_id, a_br), ty::re_scope(b_id)) {
1335+
self.c_regions_free_scope(a, a_id, a_br, b, b_id)
1336+
}
1337+
1338+
(ty::re_scope(a_id), ty::re_free(b_id, b_br)) {
1339+
self.c_regions_scope_free(b, b_id, b, b_id, b_br)
13331340
}
13341341

13351342
(ty::re_scope(a_id), ty::re_scope(b_id)) {
@@ -1473,6 +1480,15 @@ impl of combine for lub {
14731480
ret ok(a); // NDM--not so for nested functions
14741481
}
14751482

1483+
fn c_regions_scope_free(
1484+
a: ty::region, a_id: ast::node_id,
1485+
b: ty::region, b_id: ast::node_id, b_br: ty::bound_region)
1486+
-> cres<ty::region> {
1487+
1488+
// LUB is commutative:
1489+
self.c_regions_free_scope(b, b_id, b_br, a, a_id)
1490+
}
1491+
14761492
fn c_regions_scope_scope(a: ty::region, a_id: ast::node_id,
14771493
b: ty::region, b_id: ast::node_id)
14781494
-> cres<ty::region> {
@@ -1614,6 +1630,15 @@ impl of combine for glb {
16141630
ret ok(b); // NDM--not so for nested functions
16151631
}
16161632

1633+
fn c_regions_scope_free(
1634+
a: ty::region, a_id: ast::node_id,
1635+
b: ty::region, b_id: ast::node_id, b_br: ty::bound_region)
1636+
-> cres<ty::region> {
1637+
1638+
// GLB is commutative:
1639+
self.c_regions_free_scope(b, b_id, b_br, a, a_id)
1640+
}
1641+
16171642
fn c_regions_scope_scope(a: ty::region, a_id: ast::node_id,
16181643
b: ty::region, b_id: ast::node_id)
16191644
-> cres<ty::region> {

0 commit comments

Comments
 (0)