diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-08-06 13:51:50 +0100 |
|---|---|---|
| committer | Boxy <rust@boxyuwu.dev> | 2025-08-06 16:55:50 +0100 |
| commit | 7bc34622f037fedf3cf15c4a6beea1b40494cb2f (patch) | |
| tree | cef0c0a6a0bb035a176c63b6ac53e5b335cd6390 /library/core/src/slice | |
| parent | 351e4bd1066a9d89b4d9f06c628ba0733c1850b5 (diff) | |
tidy
Diffstat (limited to 'library/core/src/slice')
| -rw-r--r-- | library/core/src/slice/cmp.rs | 6 | ||||
| -rw-r--r-- | library/core/src/slice/index.rs | 4 | ||||
| -rw-r--r-- | library/core/src/slice/mod.rs | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/library/core/src/slice/cmp.rs b/library/core/src/slice/cmp.rs index 1eda8bc1bec..68bd12aa7bf 100644 --- a/library/core/src/slice/cmp.rs +++ b/library/core/src/slice/cmp.rs @@ -11,7 +11,7 @@ use crate::ops::ControlFlow; #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] impl<T, U> const PartialEq<[U]> for [T] where - T: ~const PartialEq<U>, + T: [const] PartialEq<U>, { fn eq(&self, other: &[U]) -> bool { SlicePartialEq::equal(self, other) @@ -109,7 +109,7 @@ trait SlicePartialEq<B> { #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] impl<A, B> const SlicePartialEq<B> for [A] where - A: ~const PartialEq<B>, + A: [const] PartialEq<B>, { default fn equal(&self, other: &[B]) -> bool { if self.len() != other.len() { @@ -138,7 +138,7 @@ where #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] impl<A, B> const SlicePartialEq<B> for [A] where - A: ~const BytewiseEq<B>, + A: [const] BytewiseEq<B>, { fn equal(&self, other: &[B]) -> bool { if self.len() != other.len() { diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 322b3580ede..ae360df80f6 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -9,7 +9,7 @@ use crate::{ops, range}; #[rustc_const_unstable(feature = "const_index", issue = "143775")] impl<T, I> const ops::Index<I> for [T] where - I: ~const SliceIndex<[T]>, + I: [const] SliceIndex<[T]>, { type Output = I::Output; @@ -23,7 +23,7 @@ where #[rustc_const_unstable(feature = "const_index", issue = "143775")] impl<T, I> const ops::IndexMut<I> for [T] where - I: ~const SliceIndex<[T]>, + I: [const] SliceIndex<[T]>, { #[inline(always)] fn index_mut(&mut self, index: I) -> &mut I::Output { diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index cb3315f362a..64f5b5dd831 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -569,7 +569,7 @@ impl<T> [T] { #[rustc_const_unstable(feature = "const_index", issue = "143775")] pub const fn get<I>(&self, index: I) -> Option<&I::Output> where - I: ~const SliceIndex<Self>, + I: [const] SliceIndex<Self>, { index.get(self) } @@ -596,7 +596,7 @@ impl<T> [T] { #[rustc_const_unstable(feature = "const_index", issue = "143775")] pub const fn get_mut<I>(&mut self, index: I) -> Option<&mut I::Output> where - I: ~const SliceIndex<Self>, + I: [const] SliceIndex<Self>, { index.get_mut(self) } @@ -636,7 +636,7 @@ impl<T> [T] { #[rustc_const_unstable(feature = "const_index", issue = "143775")] pub const unsafe fn get_unchecked<I>(&self, index: I) -> &I::Output where - I: ~const SliceIndex<Self>, + I: [const] SliceIndex<Self>, { // SAFETY: the caller must uphold most of the safety requirements for `get_unchecked`; // the slice is dereferenceable because `self` is a safe reference. @@ -681,7 +681,7 @@ impl<T> [T] { #[rustc_const_unstable(feature = "const_index", issue = "143775")] pub const unsafe fn get_unchecked_mut<I>(&mut self, index: I) -> &mut I::Output where - I: ~const SliceIndex<Self>, + I: [const] SliceIndex<Self>, { // SAFETY: the caller must uphold the safety requirements for `get_unchecked_mut`; // the slice is dereferenceable because `self` is a safe reference. |
