Function rustc_mir_dataflow::impls::for_each_mut_borrow
source · [−]fn for_each_mut_borrow<'tcx>(
mir: &impl MirVisitable<'tcx>,
location: Location,
f: impl FnMut(&Place<'_>)
)
Expand description
Calls f
for each mutable borrow or raw reference in the program.
This DOES NOT call f
for a shared borrow of a type with interior mutability. That’s okay for
initializedness, because we cannot move from an UnsafeCell
(outside of core::cell
), but
other analyses will likely need to check for !Freeze
.