Skip to content

Commit 3d9528a

Browse files
committed
Unstabilise words for now.
It is not totally clear if we should just use whitespace, or if the full unicode word-breaking algorithm is more correct. If there is demand we can reconsider this decision (and consider the precise algorithm to use in detail). cc rust-lang#15628.
1 parent 39b463f commit 3d9528a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcollections/str.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,8 @@ pub trait StrExt: Index<RangeFull, Output = str> {
12851285
/// let v: Vec<&str> = some_words.words().collect();
12861286
/// assert_eq!(v, vec!["Mary", "had", "a", "little", "lamb"]);
12871287
/// ```
1288-
#[stable(feature = "rust1", since = "1.0.0")]
1288+
#[unstable(feature = "str_words",
1289+
reason = "the precise algorithm to use is unclear")]
12891290
fn words(&self) -> Words {
12901291
UnicodeStr::words(&self[])
12911292
}

0 commit comments

Comments
 (0)