@@ -1326,14 +1326,20 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1326
1326
} )
1327
1327
}
1328
1328
1329
- // Evaluate whether `sup_region == sub_region`.
1330
- fn eval_equal ( & self , r1 : RegionVid , r2 : RegionVid ) -> bool {
1329
+ /// Evaluate whether `sup_region == sub_region`.
1330
+ ///
1331
+ /// Panics if called before `solve()` executes,
1332
+ // This is `pub` because it's used by unstable external borrowck data users, see `consumers.rs`.
1333
+ pub fn eval_equal ( & self , r1 : RegionVid , r2 : RegionVid ) -> bool {
1331
1334
self . eval_outlives ( r1, r2) && self . eval_outlives ( r2, r1)
1332
1335
}
1333
1336
1334
- // Evaluate whether `sup_region: sub_region`.
1337
+ /// Evaluate whether `sup_region: sub_region`.
1338
+ ///
1339
+ /// Panics if called before `solve()` executes,
1340
+ // This is `pub` because it's used by unstable external borrowck data users, see `consumers.rs`.
1335
1341
#[ instrument( skip( self ) , level = "debug" , ret) ]
1336
- fn eval_outlives ( & self , sup_region : RegionVid , sub_region : RegionVid ) -> bool {
1342
+ pub fn eval_outlives ( & self , sup_region : RegionVid , sub_region : RegionVid ) -> bool {
1337
1343
debug ! (
1338
1344
"sup_region's value = {:?} universal={:?}" ,
1339
1345
self . region_value_str( sup_region) ,
@@ -2246,7 +2252,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
2246
2252
}
2247
2253
2248
2254
/// Access to the SCC constraint graph.
2249
- pub ( crate ) fn constraint_sccs ( & self ) -> & Sccs < RegionVid , ConstraintSccIndex > {
2255
+ /// This can be used to quickly under-approximate the regions which are equal to each other
2256
+ /// and their relative orderings.
2257
+ // This is `pub` because it's used by unstable external borrowck data users, see `consumers.rs`.
2258
+ pub fn constraint_sccs ( & self ) -> & Sccs < RegionVid , ConstraintSccIndex > {
2250
2259
self . constraint_sccs . as_ref ( )
2251
2260
}
2252
2261
0 commit comments