about summary refs log tree commit diff
path: root/library/core/src/ops/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/ops/index.rs')
-rw-r--r--library/core/src/ops/index.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/library/core/src/ops/index.rs b/library/core/src/ops/index.rs
index 1aed2fb4742..2c62a3930c2 100644
--- a/library/core/src/ops/index.rs
+++ b/library/core/src/ops/index.rs
@@ -55,9 +55,8 @@
 #[doc(alias = "]")]
 #[doc(alias = "[")]
 #[doc(alias = "[]")]
-#[const_trait]
 #[rustc_const_unstable(feature = "const_index", issue = "143775")]
-pub trait Index<Idx: ?Sized> {
+pub const trait Index<Idx: ?Sized> {
     /// The returned type after indexing.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_diagnostic_item = "IndexOutput"]
@@ -168,8 +167,7 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
 #[doc(alias = "]")]
 #[doc(alias = "[]")]
 #[rustc_const_unstable(feature = "const_index", issue = "143775")]
-#[const_trait]
-pub trait IndexMut<Idx: ?Sized>: [const] Index<Idx> {
+pub const trait IndexMut<Idx: ?Sized>: [const] Index<Idx> {
     /// Performs the mutable indexing (`container[index]`) operation.
     ///
     /// # Panics