about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-04 23:32:20 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-04 23:32:20 -0800
commit267b73d95e4fcc906e1b1207ab610fa45f6e6613 (patch)
treeb9b264b3fd5a503116ebf8eea713fb538d2c1b33 /src/libcore
parented22606c8382822efc555f72f895c560289a5c70 (diff)
std: Fixup some missing stabilization on str
* The `str` module itself is stable.
* The `StrExt` trait is stable (and impls).
* The `Utf8Error` type is unstable.
* The `from_utf8` function is stable
* Some iterators are now stable:
  * `Chars`
  * `CharIndices`
* The `MatchIndices` iterator is now unstable
* The public `traits` module is no longer public.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/str/mod.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index d069744f8da..964e0089e44 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -142,6 +142,7 @@ Section: Creating a string
 
 /// Errors which can occur when attempting to interpret a byte slice as a `str`.
 #[derive(Copy, Eq, PartialEq, Clone)]
+#[unstable = "error enumeration recently added and definitions may be refined"]
 pub enum Utf8Error {
     /// An invalid byte was detected at the byte offset given.
     ///
@@ -165,6 +166,7 @@ pub enum Utf8Error {
 ///
 /// Returns `Err` if the slice is not utf-8 with a description as to why the
 /// provided slice is not utf-8.
+#[stable]
 pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
     try!(run_utf8_validation_iterator(&mut v.iter()));
     Ok(unsafe { from_utf8_unchecked(v) })
@@ -247,6 +249,7 @@ Section: Iterators
 ///
 /// Created with the method `.chars()`.
 #[derive(Clone, Copy)]
+#[stable]
 pub struct Chars<'a> {
     iter: slice::Iter<'a, u8>
 }
@@ -356,6 +359,7 @@ impl<'a> DoubleEndedIterator for Chars<'a> {
 /// External iterator for a string's characters and their byte offsets.
 /// Use with the `std::iter` module.
 #[derive(Clone)]
+#[stable]
 pub struct CharIndices<'a> {
     front_offset: uint,
     iter: Chars<'a>,
@@ -848,6 +852,7 @@ impl Searcher {
 /// An iterator over the start and end indices of the matches of a
 /// substring within a larger string
 #[derive(Clone)]
+#[unstable = "type may be removed"]
 pub struct MatchIndices<'a> {
     // constants
     haystack: &'a str,
@@ -858,7 +863,7 @@ pub struct MatchIndices<'a> {
 /// An iterator over the substrings of a string separated by a given
 /// search string
 #[derive(Clone)]
-#[unstable = "Type might get removed"]
+#[unstable = "type may be removed"]
 pub struct SplitStr<'a> {
     it: MatchIndices<'a>,
     last_end: uint,
@@ -1056,8 +1061,7 @@ const TAG_CONT_U8: u8 = 0b1000_0000u8;
 Section: Trait implementations
 */
 
-#[allow(missing_docs)]
-pub mod traits {
+mod traits {
     use cmp::{Ordering, Ord, PartialEq, PartialOrd, Eq};
     use cmp::Ordering::{Less, Equal, Greater};
     use iter::IteratorExt;