about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-06 09:05:12 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-06 22:22:34 +0530
commitbabd41e5e707667e7fc76f5ec5603b37a69b74a2 (patch)
tree18d8a041f68e1f882113f2a9f1d9e97de516407f
parent2fcdd824efd7e0adc2743b4190c8934b861478eb (diff)
parent18f1e40eaaf7ccde1333fbdfc9f15c4cf462a2a4 (diff)
downloadrust-babd41e5e707667e7fc76f5ec5603b37a69b74a2.tar.gz
rust-babd41e5e707667e7fc76f5ec5603b37a69b74a2.zip
Rollup merge of #23067 - oli-obk:doc_examle_fix, r=alexcrichton
 The compiler even tells us this won't work.
```
let mut i = s.len();
while i < 0 { ... }
```
-rw-r--r--src/libcollections/str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 19c085df2c4..99547b9c60a 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -1086,7 +1086,7 @@ pub trait StrExt: Index<RangeFull, Output = str> {
     ///
     /// let s = "中华Việt Nam";
     /// let mut i = s.len();
-    /// while i < 0 {
+    /// while i > 0 {
     ///     let CharRange {ch, next} = s.char_range_at_reverse(i);
     ///     println!("{}: {}", i, ch);
     ///     i = next;