From 1b568ba0fd531ff33d45cb52d5c8cbfe1908be86 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 7 Apr 2015 17:15:58 -0700 Subject: [PATCH] std: Hide facade extension traits in docs These traits are currently all just unstable parts of the facade which are implementation details for primitives further up the facade. This may make it more difficult to find what set of methods you get if only linking to libcore, but for now that's also unstable behavior. Closes #22025 --- src/libcore/char.rs | 1 + src/libcore/num/mod.rs | 1 + src/libcore/slice.rs | 1 + src/libcore/str/mod.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 010415b364a..ba9748eea71 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -139,6 +139,7 @@ pub fn from_digit(num: u32, radix: u32) -> Option { // NB: the stabilization and documentation for this trait is in // unicode/char.rs, not here #[allow(missing_docs)] // docs in libunicode/u_char.rs +#[doc(hidden)] pub trait CharExt { fn is_digit(self, radix: u32) -> bool; fn to_digit(self, radix: u32) -> Option; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 28e0bcf13dd..2a194766834 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2476,6 +2476,7 @@ pub enum FpCategory { // `unused_self`. Removing it requires #8888 to be fixed. #[unstable(feature = "core", reason = "distribution of methods between core/std is unclear")] +#[doc(hidden)] pub trait Float : Copy + Clone + NumCast diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index 70e60adf64c..0e6acf0160d 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -63,6 +63,7 @@ use raw::Slice as RawSlice; /// Extension methods for slices. #[allow(missing_docs)] // docs in libcollections +#[doc(hidden)] pub trait SliceExt { type Item; diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 5c8b6a774cd..9bc760b56ec 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -1496,6 +1496,7 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str { /// Methods for string slices #[allow(missing_docs)] +#[doc(hidden)] pub trait StrExt { // NB there are no docs here are they're all located on the StrExt trait in // libcollections, not here.