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 { ... }
```
This commit is contained in:
Manish Goregaokar 2015-03-06 09:05:12 +05:30
commit babd41e5e7

View File

@ -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;