Skip to content

Commit 1b568ba

Browse files
committed
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
1 parent f651bea commit 1b568ba

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/libcore/char.rs

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pub fn from_digit(num: u32, radix: u32) -> Option<char> {
139139
// NB: the stabilization and documentation for this trait is in
140140
// unicode/char.rs, not here
141141
#[allow(missing_docs)] // docs in libunicode/u_char.rs
142+
#[doc(hidden)]
142143
pub trait CharExt {
143144
fn is_digit(self, radix: u32) -> bool;
144145
fn to_digit(self, radix: u32) -> Option<u32>;

src/libcore/num/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2476,6 +2476,7 @@ pub enum FpCategory {
24762476
// `unused_self`. Removing it requires #8888 to be fixed.
24772477
#[unstable(feature = "core",
24782478
reason = "distribution of methods between core/std is unclear")]
2479+
#[doc(hidden)]
24792480
pub trait Float
24802481
: Copy + Clone
24812482
+ NumCast

src/libcore/slice.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ use raw::Slice as RawSlice;
6363

6464
/// Extension methods for slices.
6565
#[allow(missing_docs)] // docs in libcollections
66+
#[doc(hidden)]
6667
pub trait SliceExt {
6768
type Item;
6869

src/libcore/str/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,7 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str {
14961496

14971497
/// Methods for string slices
14981498
#[allow(missing_docs)]
1499+
#[doc(hidden)]
14991500
pub trait StrExt {
15001501
// NB there are no docs here are they're all located on the StrExt trait in
15011502
// libcollections, not here.

0 commit comments

Comments
 (0)