Skip to content

Commit d660739

Browse files
committed
Rollup merge of rust-lang#22253 - huonw:unstable-words, r=aturon
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.
2 parents 81bce52 + 3d9528a commit d660739

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)