]> git.lizzy.rs Git - rust.git/commitdiff
Add some texts to make the tidy check for unsafe documentation pass
authorPoliorcetics <poliorcetics@users.noreply.github.com>
Tue, 11 Aug 2020 19:37:22 +0000 (21:37 +0200)
committerGitHub <noreply@github.com>
Tue, 11 Aug 2020 19:37:22 +0000 (21:37 +0200)
library/core/src/slice/mod.rs

index 8ad3c414454ae68edfe3e18804073f22e8c64483..f511ca8eb7851f207aaa809738fb3683e28231a5 100644 (file)
@@ -559,7 +559,7 @@ pub fn reverse(&mut self) {
             // Use the llvm.bswap intrinsic to reverse u8s in a usize
             let chunk = mem::size_of::<usize>();
             while i + chunk - 1 < ln / 2 {
-                // SAFETY:
+                // SAFETY: There are several things to check here:
                 //
                 // - Note that `chunk` is either 4 or 8 due to the cfg check
                 //   above. So `chunk - 1` is positive.