about summary refs log tree commit diff
path: root/library/core/src/slice
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-09-22 09:28:38 +0200
committerRalf Jung <post@ralfj.de>2025-09-22 09:28:38 +0200
commit7d0012914ea223ba1f6b7dae1ecd31be95e0051a (patch)
tree029bbf899e9e38752aea8becbb23cb71ddb5b9cd /library/core/src/slice
parent9f32ccf35fb877270bc44a86a126440f04d676d0 (diff)
assert_unsafe_precondition: fix some incorrect check_language_ub
Diffstat (limited to 'library/core/src/slice')
-rw-r--r--library/core/src/slice/index.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs
index a8147d745f3..d4c466201ed 100644
--- a/library/core/src/slice/index.rs
+++ b/library/core/src/slice/index.rs
@@ -233,7 +233,7 @@ unsafe impl<T> const SliceIndex<[T]> for usize {
     #[track_caller]
     unsafe fn get_unchecked(self, slice: *const [T]) -> *const T {
         assert_unsafe_precondition!(
-            check_language_ub,
+            check_language_ub, // okay because of the `assume` below
             "slice::get_unchecked requires that the index is within the slice",
             (this: usize = self, len: usize = slice.len()) => this < len
         );