]> git.lizzy.rs Git - rust.git/blobdiff - src/libcollections/str.rs
rollup merge of #20482: kmcallister/macro-reform
[rust.git] / src / libcollections / str.rs
index 69403ccd88be8b874770dd75c374c5f405f217fb..c0482702ccdb66c1a6ee149ebaa0811d7a66808b 100644 (file)
@@ -50,6 +50,7 @@
 //! is the same as `&[u8]`.
 
 #![doc(primitive = "str")]
+#![stable]
 
 use self::RecompositionState::*;
 use self::DecompositionType::*;
@@ -59,7 +60,6 @@
 use core::clone::Clone;
 use core::iter::AdditiveIterator;
 use core::iter::{range, Iterator, IteratorExt};
-use core::kinds::Sized;
 use core::ops;
 use core::option::Option::{self, Some, None};
 use core::slice::AsSlice;
@@ -165,6 +165,7 @@ enum DecompositionType {
 /// External iterator for a string's decomposition's characters.
 /// Use with the `std::iter` module.
 #[derive(Clone)]
+#[unstable]
 pub struct Decompositions<'a> {
     kind: DecompositionType,
     iter: Chars<'a>,
@@ -172,6 +173,7 @@ pub struct Decompositions<'a> {
     sorted: bool
 }
 
+#[stable]
 impl<'a> Iterator for Decompositions<'a> {
     type Item = char;
 
@@ -253,6 +255,7 @@ enum RecompositionState {
 /// External iterator for a string's recomposition's characters.
 /// Use with the `std::iter` module.
 #[derive(Clone)]
+#[unstable]
 pub struct Recompositions<'a> {
     iter: Decompositions<'a>,
     state: RecompositionState,
@@ -261,6 +264,7 @@ pub struct Recompositions<'a> {
     last_ccc: Option<u8>
 }
 
+#[stable]
 impl<'a> Iterator for Recompositions<'a> {
     type Item = char;
 
@@ -348,10 +352,12 @@ fn next(&mut self) -> Option<char> {
 /// External iterator for a string's UTF16 codeunits.
 /// Use with the `std::iter` module.
 #[derive(Clone)]
+#[unstable]
 pub struct Utf16Units<'a> {
     encoder: Utf16Encoder<Chars<'a>>
 }
 
+#[stable]
 impl<'a> Iterator for Utf16Units<'a> {
     type Item = u16;
 
@@ -401,7 +407,8 @@ fn to_owned(&self) -> String {
 */
 
 /// Any string that can be represented as a slice.
-pub trait StrExt for Sized?: ops::Slice<uint, str> {
+#[stable]
+pub trait StrExt: ops::Slice<uint, str> {
     /// Escapes each char in `s` with `char::escape_default`.
     #[unstable = "return type may change to be an iterator"]
     fn escape_default(&self) -> String {
@@ -1340,6 +1347,7 @@ fn trim_right(&self) -> &str {
     }
 }
 
+#[stable]
 impl StrExt for str {}
 
 #[cfg(test)]