You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But mutable references to arrays can usually be split into several references if they don't overlap in the conventional sense, but this contradicts the definition with arrays.
The text was updated successfully, but these errors were encountered:
Yeah, these rules only apply when borrow checking manually created references, so we should clarify that. &mut a[0] and &mut a[1] conflict, but let [x,y,..] = a is fine (and so is an unsafe implementation like split_at_mut).
We should re-phrase this in general. Phrasing this in terms of values seems a bit odd, we also don't specify that this is a borrowing restriction as outlined by Jonas.
You define overlap as
So even if they don't overlap in memory location, but are part of the same array, they are still considered to overlap. However, you then define:
But mutable references to arrays can usually be split into several references if they don't overlap in the conventional sense, but this contradicts the definition with arrays.
The text was updated successfully, but these errors were encountered: