diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-08-07 10:07:35 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-08-07 14:52:59 -0400 |
| commit | db7a07cfc6cdb54dff024fa4f809e139a92c067c (patch) | |
| tree | 78abe65eb7725332b3a7c2c90793c158b2050dae | |
| parent | fb1702f3010d8aedb54df5f4ed631e98fca9cb02 (diff) | |
| download | rust-db7a07cfc6cdb54dff024fa4f809e139a92c067c.tar.gz rust-db7a07cfc6cdb54dff024fa4f809e139a92c067c.zip | |
update comment to more accurately describe the limitations
| -rw-r--r-- | src/librustc_mir/borrow_check/nll/constraints/mod.rs | 8 |
1 files 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) } |
