Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/disjoint_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,14 +1005,14 @@ unsafe impl<V> AsMutPtr for [V] {
}
}

/// SAFETY: We never materialize a `&mut [V]` since we go use [`addr_of_mut!`]
/// SAFETY: We never materialize a `&mut [V]` since we use [`&raw mut`](`addr_of_mut!`)
/// to create a `*mut [V]` directly, which we then unsize cast.
unsafe impl<V> AsMutPtr for Box<[V]> {
type Target = V;

// SAFETY: `AsMutPtr::as_mut_ptr` may derefence `ptr`.
unsafe fn as_mut_ptr(ptr: *mut Self) -> *mut Self::Target {
// SAFETY: `AsMutPtr::as_mut_ptr` may derefence `ptr`.
unsafe { addr_of_mut!(**ptr) }.cast()
unsafe { &raw mut **ptr }.cast()
}

fn len(&self) -> usize {
Expand Down
Loading