@@ -978,6 +978,10 @@ iface combine {
978
978
fn c_regions_scope_scope (
979
979
a : ty:: region , a_id : ast:: node_id ,
980
980
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 > ;
981
985
fn c_regions_free_scope (
982
986
a : ty:: region , a_id : ast:: node_id , a_br : ty:: bound_region ,
983
987
b : ty:: region , b_id : ast:: node_id ) -> cres < ty:: region > ;
@@ -1327,9 +1331,12 @@ fn c_regions<C:combine>(
1327
1331
{ |x, y| self . c_regions ( x, y) } )
1328
1332
}
1329
1333
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)
1333
1340
}
1334
1341
1335
1342
( ty:: re_scope ( a_id) , ty:: re_scope ( b_id) ) {
@@ -1473,6 +1480,15 @@ impl of combine for lub {
1473
1480
ret ok( a) ; // NDM--not so for nested functions
1474
1481
}
1475
1482
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
+
1476
1492
fn c_regions_scope_scope ( a : ty:: region , a_id : ast:: node_id ,
1477
1493
b : ty:: region , b_id : ast:: node_id )
1478
1494
-> cres < ty:: region > {
@@ -1614,6 +1630,15 @@ impl of combine for glb {
1614
1630
ret ok( b) ; // NDM--not so for nested functions
1615
1631
}
1616
1632
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
+
1617
1642
fn c_regions_scope_scope ( a : ty:: region , a_id : ast:: node_id ,
1618
1643
b : ty:: region , b_id : ast:: node_id )
1619
1644
-> cres < ty:: region > {
0 commit comments