about summary refs log tree commit diff
diff options
context:
space:
mode:
authorr00ster <r00ster91@protonmail.com>2021-04-18 18:16:10 +0200
committerGitHub <noreply@github.com>2021-04-18 18:16:10 +0200
commitc86ffe9e8910cb1bac1737878a524e146b54375e (patch)
tree2e5c13be1e039f599b359b9024a80e0042f54734
parentdf01b3a67b33ef0ff7ab1f27f41056093f5b2574 (diff)
downloadrust-c86ffe9e8910cb1bac1737878a524e146b54375e.tar.gz
rust-c86ffe9e8910cb1bac1737878a524e146b54375e.zip
Say that it "may panic"
-rw-r--r--library/core/src/ops/index.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ops/index.rs b/library/core/src/ops/index.rs
index 515ccd6aa23..964378cc9c3 100644
--- a/library/core/src/ops/index.rs
+++ b/library/core/src/ops/index.rs
@@ -64,7 +64,7 @@ pub trait Index<Idx: ?Sized> {
     ///
     /// # Panics
     ///
-    /// Panics if the index is out of bounds.
+    /// May panic if the index is out of bounds.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[track_caller]
     fn index(&self, index: Idx) -> &Self::Output;
@@ -168,7 +168,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
     ///
     /// # Panics
     ///
-    /// Panics if the index is out of bounds.
+    /// May panic if the index is out of bounds.
     #[stable(feature = "rust1", since = "1.0.0")]
     #[track_caller]
     fn index_mut(&mut self, index: Idx) -> &mut Self::Output;