File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/librustc_mir/dataflow/impls Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,11 @@ use crate::dataflow::{self, GenKillSet};
88
99/// Whether a borrow to a `Local` has been created that could allow that `Local` to be mutated
1010/// indirectly. This could either be a mutable reference (`&mut`) or a shared borrow if the type of
11- /// that `Local` allows interior mutability.
11+ /// that `Local` allows interior mutability. Operations that can mutate local's indirectly include:
12+ /// assignments through a pointer (`*p = 42`), function calls, drop terminators and inline assembly.
1213///
13- /// If this returns false for a `Local` at the location of an indirect assignment, that `Local`
14- /// cannot be mutated by that assignment. For example, if the dataflow state at a statement like
15- /// `*p = 42` contained locals `x` and `z` but not `y`, we know that while `x` or `z` may be the
16- /// target of that assignment, `y` cannot be.
17- ///
18- /// Assignments through a pointer are not the only place where a `Local` can be mutated indirectly:
19- /// Function calls, drop terminators and inline assembly can all mutate `Local`s as a side-effect.
14+ /// If this returns false for a `Local` at a given statement (or terminator), that `Local` could
15+ /// not possibly have been mutated indirectly prior to that statement.
2016#[ derive( Copy , Clone ) ]
2117pub struct IndirectlyMutableLocals < ' mir , ' tcx > {
2218 body : & ' mir mir:: Body < ' tcx > ,
You can’t perform that action at this time.
0 commit comments