about summary refs log tree commit diff
path: root/src/libcore/slice
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-07-19 09:11:56 +0200
committerRalf Jung <post@ralfj.de>2018-07-19 09:11:56 +0200
commit16c057256f68b39df70737838f367cf645d6e0c7 (patch)
treeeb9eb16922002dcda352f21f385e0f72ee470a16 /src/libcore/slice
parent12ed235adc62e63b16bb4f715b143c37a5efa00d (diff)
downloadrust-16c057256f68b39df70737838f367cf645d6e0c7.tar.gz
rust-16c057256f68b39df70737838f367cf645d6e0c7.zip
fix safety-related comment in slice::rotate
Diffstat (limited to 'src/libcore/slice')
-rw-r--r--src/libcore/slice/rotate.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/slice/rotate.rs b/src/libcore/slice/rotate.rs
index e4a4e33c172..28ef53ccb5c 100644
--- a/src/libcore/slice/rotate.rs
+++ b/src/libcore/slice/rotate.rs
@@ -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
 ///
@@ -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;
         }