From 5170f8d924f4e4ddf6d42eb961156bf2eabb3b7f Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Tue, 18 Sep 2018 22:14:23 -0700 Subject: [PATCH] Hide methods on SliceIndex trait Rustdoc should be able to handle that. Fixes #13698. --- src/libcore/slice/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index da4a56cfecd6e..4a871c3750f9c 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1975,31 +1975,37 @@ pub trait SliceIndex: private_slice_index::Sealed { /// Returns a shared reference to the output at this location, if in /// bounds. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] fn get(self, slice: &T) -> Option<&Self::Output>; /// Returns a mutable reference to the output at this location, if in /// bounds. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] fn get_mut(self, slice: &mut T) -> Option<&mut Self::Output>; /// Returns a shared reference to the output at this location, without /// performing any bounds checking. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] unsafe fn get_unchecked(self, slice: &T) -> &Self::Output; /// Returns a mutable reference to the output at this location, without /// performing any bounds checking. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] unsafe fn get_unchecked_mut(self, slice: &mut T) -> &mut Self::Output; /// Returns a shared reference to the output at this location, panicking /// if out of bounds. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] fn index(self, slice: &T) -> &Self::Output; /// Returns a mutable reference to the output at this location, panicking /// if out of bounds. + #[doc(hidden)] #[unstable(feature = "slice_index_methods", issue = "0")] fn index_mut(self, slice: &mut T) -> &mut Self::Output; }