about summary refs log tree commit diff
path: root/library/core/src/str
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2025-08-06 13:51:50 +0100
committerBoxy <rust@boxyuwu.dev>2025-08-06 16:55:50 +0100
commit7bc34622f037fedf3cf15c4a6beea1b40494cb2f (patch)
treecef0c0a6a0bb035a176c63b6ac53e5b335cd6390 /library/core/src/str
parent351e4bd1066a9d89b4d9f06c628ba0733c1850b5 (diff)
tidy
Diffstat (limited to 'library/core/src/str')
-rw-r--r--library/core/src/str/mod.rs4
-rw-r--r--library/core/src/str/traits.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs
index c40af4de7e0..1b6e84175b9 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -603,7 +603,7 @@ impl str {
     #[stable(feature = "str_checked_slicing", since = "1.20.0")]
     #[rustc_const_unstable(feature = "const_index", issue = "143775")]
     #[inline]
-    pub const fn get<I: ~const SliceIndex<str>>(&self, i: I) -> Option<&I::Output> {
+    pub const fn get<I: [const] SliceIndex<str>>(&self, i: I) -> Option<&I::Output> {
         i.get(self)
     }
 
@@ -636,7 +636,7 @@ impl str {
     #[stable(feature = "str_checked_slicing", since = "1.20.0")]
     #[rustc_const_unstable(feature = "const_index", issue = "143775")]
     #[inline]
-    pub const fn get_mut<I: ~const SliceIndex<str>>(&mut self, i: I) -> Option<&mut I::Output> {
+    pub const fn get_mut<I: [const] SliceIndex<str>>(&mut self, i: I) -> Option<&mut I::Output> {
         i.get_mut(self)
     }
 
diff --git a/library/core/src/str/traits.rs b/library/core/src/str/traits.rs
index 1597d1c1fa8..dc88f35eca7 100644
--- a/library/core/src/str/traits.rs
+++ b/library/core/src/str/traits.rs
@@ -53,7 +53,7 @@ impl PartialOrd for str {
 #[rustc_const_unstable(feature = "const_index", issue = "143775")]
 impl<I> const ops::Index<I> for str
 where
-    I: ~const SliceIndex<str>,
+    I: [const] SliceIndex<str>,
 {
     type Output = I::Output;
 
@@ -67,7 +67,7 @@ where
 #[rustc_const_unstable(feature = "const_index", issue = "143775")]
 impl<I> const ops::IndexMut<I> for str
 where
-    I: ~const SliceIndex<str>,
+    I: [const] SliceIndex<str>,
 {
     #[inline]
     fn index_mut(&mut self, index: I) -> &mut I::Output {