diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-06 09:05:12 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-06 22:22:34 +0530 |
| commit | babd41e5e707667e7fc76f5ec5603b37a69b74a2 (patch) | |
| tree | 18d8a041f68e1f882113f2a9f1d9e97de516407f | |
| parent | 2fcdd824efd7e0adc2743b4190c8934b861478eb (diff) | |
| parent | 18f1e40eaaf7ccde1333fbdfc9f15c4cf462a2a4 (diff) | |
| download | rust-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.rs | 2 |
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; |
