pub fn has_non_owning_mutable_access<'tcx>(
cx: &LateContext<'tcx>,
iter_ty: Ty<'tcx>,
) -> bool
Expand description
Check if a Ty<’_> of Iterator
contains any mutable access to non-owning types by checking if
it contains fields of mutable references or pointers, or references/pointers to non-Freeze
types, or PhantomData
types containing any of the previous. This can be used to check whether
skipping iterating over an iterator will change its behavior.