From 9754b3fc1d9d24bc1e65136e5798cc5a6d226a4f Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Thu, 21 May 2020 18:44:25 +0100 Subject: [PATCH] Document `collect_bounding_regions` --- .../infer/lexical_region_resolve/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/librustc_infer/infer/lexical_region_resolve/mod.rs b/src/librustc_infer/infer/lexical_region_resolve/mod.rs index ef3eb24f28852..fcf1949933b11 100644 --- a/src/librustc_infer/infer/lexical_region_resolve/mod.rs +++ b/src/librustc_infer/infer/lexical_region_resolve/mod.rs @@ -862,6 +862,17 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> { ); } + /// Collects all regions that "bound" the variable `orig_node_idx` in the + /// given direction. + /// + /// If `dup_vec` is `Some` it's used to track duplicates between successive + /// calls of this function. + /// + /// The return tuple fields are: + /// - a list of all concrete regions bounding the given region. + /// - the set of all region variables bounding the given region. + /// - a `bool` that's true if the returned region variables overlap with + /// those returned by a previous call for another region. fn collect_bounding_regions( &self, graph: &RegionGraph<'tcx>,