From: Remy Rakic Date: Tue, 19 Nov 2019 15:55:58 +0000 (+0100) Subject: UniversalRegionRelations: add a way to list the base non-transitive `outlives` constr... X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=4dd6292c3c563e53732672d878930a9c26d512fc;p=rust.git UniversalRegionRelations: add a way to list the base non-transitive `outlives` constraints --- diff --git a/src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs b/src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs index d18a8e87453..8bb68383a49 100644 --- a/src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs +++ b/src/librustc_mir/borrow_check/nll/type_check/free_region_relations.rs @@ -217,6 +217,11 @@ fn non_local_bounds<'a>( crate fn regions_outlived_by(&self, fr1: RegionVid) -> Vec<&RegionVid> { self.outlives.reachable_from(&fr1) } + + /// Returns the _non-transitive_ set of known `outlives` constraints between free regions. + crate fn known_outlives(&self) -> impl Iterator { + self.outlives.base_edges() + } } struct UniversalRegionRelationsBuilder<'this, 'tcx> {