From 00e14f16225fcf529b6d8a20c4c000d803064ec8 Mon Sep 17 00:00:00 2001 From: Ulrik Sverdrup Date: Tue, 24 Mar 2015 19:57:49 +0100 Subject: [PATCH] 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). --- src/libcollections/str.rs | 2 +- src/libcore/str/mod.rs | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index ca2786e843e..aaa73badcac 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -19,7 +19,7 @@ //! are owned elsewhere. //! //! Basic operations are implemented directly by the compiler, but more advanced -//! operations are defined on the [`StrExt`](trait.StrExt.html) trait. +//! operations are defined as methods on the `str` type. //! //! # Examples //! diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index b7285d30a73..5c4d8427ea2 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -164,8 +164,7 @@ impl FromStr for bool { /// assert!(::from_str("not even a boolean").is_err()); /// ``` /// - /// Note, in many cases, the StrExt::parse() which is based on - /// this FromStr::from_str() is more proper. + /// Note, in many cases, the `.parse()` method on `str` is more proper. /// /// ``` /// assert_eq!("true".parse(), Ok(true)); @@ -530,7 +529,7 @@ impl<'a> DoubleEndedIterator for CharIndices<'a> { /// External iterator for a string's bytes. /// Use with the `std::iter` module. /// -/// Created with `StrExt::bytes` +/// Created with `str::bytes` #[stable(feature = "rust1", since = "1.0.0")] #[derive(Clone)] pub struct Bytes<'a>(Map, BytesDeref>); @@ -1461,27 +1460,27 @@ impl<'a, S: ?Sized> Str for &'a S where S: Str { fn as_slice(&self) -> &str { Str::as_slice(*self) } } -/// Return type of `StrExt::split` +/// Return type of `str::split` #[stable(feature = "rust1", since = "1.0.0")] pub struct Split<'a, P: Pattern<'a>>(CharSplits<'a, P>); delegate_iter!{pattern &'a str : Split<'a, P>} -/// Return type of `StrExt::split_terminator` +/// Return type of `str::split_terminator` #[stable(feature = "rust1", since = "1.0.0")] pub struct SplitTerminator<'a, P: Pattern<'a>>(CharSplits<'a, P>); delegate_iter!{pattern &'a str : SplitTerminator<'a, P>} -/// Return type of `StrExt::splitn` +/// Return type of `str::splitn` #[stable(feature = "rust1", since = "1.0.0")] pub struct SplitN<'a, P: Pattern<'a>>(CharSplitsN<'a, P>); delegate_iter!{pattern forward &'a str : SplitN<'a, P>} -/// Return type of `StrExt::rsplit` +/// Return type of `str::rsplit` #[stable(feature = "rust1", since = "1.0.0")] pub struct RSplit<'a, P: Pattern<'a>>(RCharSplits<'a, P>); delegate_iter!{pattern reverse &'a str : RSplit<'a, P>} -/// Return type of `StrExt::rsplitn` +/// Return type of `str::rsplitn` #[stable(feature = "rust1", since = "1.0.0")] pub struct RSplitN<'a, P: Pattern<'a>>(RCharSplitsN<'a, P>); delegate_iter!{pattern reverse &'a str : RSplitN<'a, P>}