Module rustc_borrowck::source ·
- When checking if a place conflicts with another place, this enum is used to influence decisions where a place might be equal or disjoint with another place, such as if
a[i] == a[j].
PlaceConflictBias::Overlapwould bias toward assuming that
jand that these places overlap.
PlaceConflictBias::NoOverlapassumes that for the purposes of the predicate being run in the calling context, the conservative choice is to assume the compared indices are disjoint (and therefore, do not overlap).
- Checks whether the
borrow_placeconflicts with the
access_placegiven a borrow kind and access depth. The
biasparameter is used to determine how the unknowable (comparing runtime array indices, for example) should be interpreted - this depends on what the caller wants in order to make the conservative choice and preserve soundness.
- Helper function for checking if places conflict with a mutable borrow and deep access depth. This is used to check for places conflicting outside of the borrow checking code (such as in dataflow).