Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined behavior in
swap
with the miri stacked borrows model.
The `swap` function passed with `MIRIFLAGS=-zmiri-tree-borrows` But failed when ran through the stacked borrows model, because `get_unchecked_mut` returns `&mut` references which we need two of. by using `as_mut_ptr()` we can avoid creating multiple mutable references from a single one satisfying uniqueness.
- Loading branch information