Skip to content

Commit db7a07c

Browse files
committed
update comment to more accurately describe the limitations
1 parent fb1702f commit db7a07c

File tree

1 file changed

+5
-3
lines changed
  • src/librustc_mir/borrow_check/nll/constraints

1 file changed

+5
-3
lines changed

src/librustc_mir/borrow_check/nll/constraints/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ impl ConstraintSet {
3737
}
3838

3939
/// Constructs a graph from the constraint set; the graph makes it
40-
/// easy to find the constraints affecting a particular region
41-
/// (you should not mutate the set once this graph is
42-
/// constructed).
40+
/// easy to find the constraints affecting a particular region.
41+
///
42+
/// NB: This graph contains a "frozen" view of the current
43+
/// constraints. any new constraints added to the `ConstraintSet`
44+
/// after the graph is built will not be present in the graph.
4345
crate fn graph(&self, num_region_vars: usize) -> graph::ConstraintGraph {
4446
graph::ConstraintGraph::new(self, num_region_vars)
4547
}

0 commit comments

Comments
 (0)