about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOnè <43485962+c-git@users.noreply.github.com>2025-04-19 17:57:06 -0400
committerGitHub <noreply@github.com>2025-04-19 17:57:06 -0400
commit648653824bf8704685d45ef465a115d3dcae4ae4 (patch)
tree1d34962f638814ff447f2fb3266444899b6b5cbd
parent077cedc2afa8ac0b727b7a6cbe012940ba228deb (diff)
downloadrust-648653824bf8704685d45ef465a115d3dcae4ae4.tar.gz
rust-648653824bf8704685d45ef465a115d3dcae4ae4.zip
docs: fix typo change from inconstants to invariants
-rw-r--r--library/core/src/slice/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index 7b2a3fac38a..1ae0849db5b 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -2814,7 +2814,7 @@ impl<T> [T] {
             let half = size / 2;
             let mid = base + half;
 
-            // SAFETY: the call is made safe by the following inconstants:
+            // SAFETY: the call is made safe by the following invariants:
             // - `mid >= 0`: by definition
             // - `mid < size`: `mid = size / 2 + size / 4 + size / 8 ...`
             let cmp = f(unsafe { self.get_unchecked(mid) });