Skip to content

Commit

Permalink
fix safety-related comment in slice::rotate
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 19, 2018
1 parent 12ed235 commit 16c0572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/slice/rotate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ impl<T> RawArray<T> {
/// # Safety
///
/// The specified range must be valid for reading and writing.
/// The type `T` must have non-zero size.
///
/// # Algorithm
///
Expand All @@ -73,6 +72,7 @@ pub unsafe fn ptr_rotate<T>(mut left: usize, mid: *mut T, mut right: usize) {
loop {
let delta = cmp::min(left, right);
if delta <= RawArray::<T>::cap() {
// We will always hit this immediately for ZST.
break;
}

Expand Down

0 comments on commit 16c0572

Please sign in to comment.