Skip to content

Commit 5170f8d

Browse files
committed
Hide methods on SliceIndex trait
Rustdoc should be able to handle that. Fixes rust-lang#13698.
1 parent ff6422d commit 5170f8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libcore/slice/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,31 +1975,37 @@ pub trait SliceIndex<T: ?Sized>: private_slice_index::Sealed {
19751975

19761976
/// Returns a shared reference to the output at this location, if in
19771977
/// bounds.
1978+
#[doc(hidden)]
19781979
#[unstable(feature = "slice_index_methods", issue = "0")]
19791980
fn get(self, slice: &T) -> Option<&Self::Output>;
19801981

19811982
/// Returns a mutable reference to the output at this location, if in
19821983
/// bounds.
1984+
#[doc(hidden)]
19831985
#[unstable(feature = "slice_index_methods", issue = "0")]
19841986
fn get_mut(self, slice: &mut T) -> Option<&mut Self::Output>;
19851987

19861988
/// Returns a shared reference to the output at this location, without
19871989
/// performing any bounds checking.
1990+
#[doc(hidden)]
19881991
#[unstable(feature = "slice_index_methods", issue = "0")]
19891992
unsafe fn get_unchecked(self, slice: &T) -> &Self::Output;
19901993

19911994
/// Returns a mutable reference to the output at this location, without
19921995
/// performing any bounds checking.
1996+
#[doc(hidden)]
19931997
#[unstable(feature = "slice_index_methods", issue = "0")]
19941998
unsafe fn get_unchecked_mut(self, slice: &mut T) -> &mut Self::Output;
19951999

19962000
/// Returns a shared reference to the output at this location, panicking
19972001
/// if out of bounds.
2002+
#[doc(hidden)]
19982003
#[unstable(feature = "slice_index_methods", issue = "0")]
19992004
fn index(self, slice: &T) -> &Self::Output;
20002005

20012006
/// Returns a mutable reference to the output at this location, panicking
20022007
/// if out of bounds.
2008+
#[doc(hidden)]
20032009
#[unstable(feature = "slice_index_methods", issue = "0")]
20042010
fn index_mut(self, slice: &mut T) -> &mut Self::Output;
20052011
}

0 commit comments

Comments
 (0)