From db7a07cfc6cdb54dff024fa4f809e139a92c067c Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 7 Aug 2018 10:07:35 -0400 Subject: [PATCH] update comment to more accurately describe the limitations --- src/librustc_mir/borrow_check/nll/constraints/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/librustc_mir/borrow_check/nll/constraints/mod.rs b/src/librustc_mir/borrow_check/nll/constraints/mod.rs index 597241234cd..289557a9a07 100644 --- a/src/librustc_mir/borrow_check/nll/constraints/mod.rs +++ b/src/librustc_mir/borrow_check/nll/constraints/mod.rs @@ -37,9 +37,11 @@ impl ConstraintSet { } /// Constructs a graph from the constraint set; the graph makes it - /// easy to find the constraints affecting a particular region - /// (you should not mutate the set once this graph is - /// constructed). + /// easy to find the constraints affecting a particular region. + /// + /// NB: This graph contains a "frozen" view of the current + /// constraints. any new constraints added to the `ConstraintSet` + /// after the graph is built will not be present in the graph. crate fn graph(&self, num_region_vars: usize) -> graph::ConstraintGraph { graph::ConstraintGraph::new(self, num_region_vars) }