Skip to content

Commit 00e14f1

Browse files
author
Ulrik Sverdrup
committed
core: Update docs for StrExt demotion in libstd
Main access point of .split() and other similar methods are not using the StrExt trait anymore, so update the libcore docs to reflect this (because these docs are visible in libstd API documentation).
1 parent 227d304 commit 00e14f1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/libcollections/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! are owned elsewhere.
2020
//!
2121
//! Basic operations are implemented directly by the compiler, but more advanced
22-
//! operations are defined on the [`StrExt`](trait.StrExt.html) trait.
22+
//! operations are defined as methods on the `str` type.
2323
//!
2424
//! # Examples
2525
//!

src/libcore/str/mod.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ impl FromStr for bool {
164164
/// assert!(<bool as FromStr>::from_str("not even a boolean").is_err());
165165
/// ```
166166
///
167-
/// Note, in many cases, the StrExt::parse() which is based on
168-
/// this FromStr::from_str() is more proper.
167+
/// Note, in many cases, the `.parse()` method on `str` is more proper.
169168
///
170169
/// ```
171170
/// assert_eq!("true".parse(), Ok(true));
@@ -530,7 +529,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> {
530529
/// External iterator for a string's bytes.
531530
/// Use with the `std::iter` module.
532531
///
533-
/// Created with `StrExt::bytes`
532+
/// Created with `str::bytes`
534533
#[stable(feature = "rust1", since = "1.0.0")]
535534
#[derive(Clone)]
536535
pub struct Bytes<'a>(Map<slice::Iter<'a, u8>, BytesDeref>);
@@ -1461,27 +1460,27 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str {
14611460
fn as_slice(&self) -> &str { Str::as_slice(*self) }
14621461
}
14631462

1464-
/// Return type of `StrExt::split`
1463+
/// Return type of `str::split`
14651464
#[stable(feature = "rust1", since = "1.0.0")]
14661465
pub struct Split<'a, P: Pattern<'a>>(CharSplits<'a, P>);
14671466
delegate_iter!{pattern &'a str : Split<'a, P>}
14681467

1469-
/// Return type of `StrExt::split_terminator`
1468+
/// Return type of `str::split_terminator`
14701469
#[stable(feature = "rust1", since = "1.0.0")]
14711470
pub struct SplitTerminator<'a, P: Pattern<'a>>(CharSplits<'a, P>);
14721471
delegate_iter!{pattern &'a str : SplitTerminator<'a, P>}
14731472

1474-
/// Return type of `StrExt::splitn`
1473+
/// Return type of `str::splitn`
14751474
#[stable(feature = "rust1", since = "1.0.0")]
14761475
pub struct SplitN<'a, P: Pattern<'a>>(CharSplitsN<'a, P>);
14771476
delegate_iter!{pattern forward &'a str : SplitN<'a, P>}
14781477

1479-
/// Return type of `StrExt::rsplit`
1478+
/// Return type of `str::rsplit`
14801479
#[stable(feature = "rust1", since = "1.0.0")]
14811480
pub struct RSplit<'a, P: Pattern<'a>>(RCharSplits<'a, P>);
14821481
delegate_iter!{pattern reverse &'a str : RSplit<'a, P>}
14831482

1484-
/// Return type of `StrExt::rsplitn`
1483+
/// Return type of `str::rsplitn`
14851484
#[stable(feature = "rust1", since = "1.0.0")]
14861485
pub struct RSplitN<'a, P: Pattern<'a>>(RCharSplitsN<'a, P>);
14871486
delegate_iter!{pattern reverse &'a str : RSplitN<'a, P>}

0 commit comments

Comments
 (0)