1
Fork 0

Say that it "may panic"

This commit is contained in:
r00ster 2021-04-18 18:16:10 +02:00 committed by GitHub
parent df01b3a67b
commit c86ffe9e89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;