Skip to content

Commit 4dd6292

Browse files
committed
UniversalRegionRelations: add a way to list the base non-transitive outlives constraints
1 parent 4b16ae1 commit 4dd6292

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ impl UniversalRegionRelations<'tcx> {
217217
crate fn regions_outlived_by(&self, fr1: RegionVid) -> Vec<&RegionVid> {
218218
self.outlives.reachable_from(&fr1)
219219
}
220+
221+
/// Returns the _non-transitive_ set of known `outlives` constraints between free regions.
222+
crate fn known_outlives(&self) -> impl Iterator<Item=(&RegionVid, &RegionVid)> {
223+
self.outlives.base_edges()
224+
}
220225
}
221226

222227
struct UniversalRegionRelationsBuilder<'this, 'tcx> {

0 commit comments

Comments
 (0)