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